Collaborators: Shane Blowes, Jon Chase, Helmut Hillebrand, Michael Burrows, Amanda Bates, Uli Brose, Benoit Gauzens, Laura Antao, Ruben Remelgado, Carsten Meyer, Myriam Hirt, maybe others Assistance: Katherine Lew, Josef Hauser
library(data.table) # for handling large datasets
library(ggplot2) # for some plotting
library(nlme) # for ME models
library(maps) # for map
library(gridExtra) # to combine ggplots together
library(grid) # to combine ggplots together
library(RColorBrewer)
library(MASS) # for stepAIC
library(piecewiseSEM) # for rsquared() for nlme models
options(width=500) # turn off most text wrapping
# tell RStudio to use project root directory as the root for this notebook. Needed since we are storing code in a separate directory.
knitr::opts_knit$set(root.dir = rprojroot::find_rstudio_root_file())
# Turnover and covariates assembled by turnover_vs_temperature_prep.Rmd
trends <- fread('output/turnover_w_covariates.csv.gz')
# set realm order
trends[, REALM := factor(REALM, levels = c('Freshwater', 'Marine', 'Terrestrial'), ordered = FALSE)]
# set up sign of temperature change
trends[, tsign := factor(sign(temptrend))]
# realm that combined Terrestrial and Freshwater, for interacting with human impact
trends[, REALM2 := REALM]
levels(trends$REALM2) = list(TerrFresh = "Freshwater", TerrFresh = "Terrestrial", Marine = "Marine")
# group Marine invertebrates/plants in with All
trends[, taxa_mod2 := taxa_mod]
trends[taxa_mod == 'Marine invertebrates/plants', taxa_mod2 := 'All']
# calculate duration
trends[, duration := maxyrBT - minyrBT + 1]
# trim to data with >= 3 yrs
trends <- trends[nyrBT >= 3, ]
trends[, tempave.sc := scale(tempave)]
trends[, tempave_metab.sc := scale(tempave_metab)]
trends[, seas.sc := scale(seas)]
trends[, microclim.sc := scale(log(microclim))]
trends[, temptrend.sc := scale(temptrend, center = FALSE)] # do not center
trends[, temptrend_abs.sc := scale(abs(temptrend), center = FALSE)] # do not center, so that 0 is still 0 temperature change
trends[, mass.sc := scale(log(mass_mean_weight))]
trends[, speed.sc := scale(log(speed_mean_weight+1))]
trends[, lifespan.sc := scale(log(lifespan_mean_weight))]
trends[, consumerfrac.sc := scale(consfrac)]
trends[, endothermfrac.sc := scale(endofrac)]
trends[, nspp.sc := scale(log(Nspp))]
trends[, thermal_bias.sc := scale(thermal_bias)]
trends[, npp.sc := scale(log(npp))]
trends[, veg.sc := scale(log(veg+1))]
trends[, duration.sc := scale(log(duration))]
trends[, human_bowler.sc := scale(log(human_bowler+1)), by = REALM2] # separate scaling by realm
trends[REALM2 == 'TerrFresh', human_footprint.sc := scale(log(human_venter+1))]
trends[REALM2 == 'Marine', human_footprint.sc := scale(log(human_halpern))]
Just turnover
cat('Overall # time-series: ', nrow(trends), '\n')
Overall # time-series: 39195
cat('# studies: ', trends[, length(unique(STUDY_ID))], '\n')
# studies: 307
cat('Data points: ', trends[, sum(nyrBT)], '\n')
Data points: 266337
trends[, table(REALM)]
REALM
Freshwater Marine Terrestrial
628 35742 2825
trends[, table(taxa_mod)]
taxa_mod
All Amphibians Benthos Birds
1447 352 4310 8719
Fish Invertebrates Mammals Marine invertebrates/plants
21708 1799 504 104
Plant Reptiles
248 4
trends[, table(taxa_mod, REALM)]
REALM
taxa_mod Freshwater Marine Terrestrial
All 0 1444 3
Amphibians 2 0 350
Benthos 0 4310 0
Birds 0 6542 2177
Fish 610 21098 0
Invertebrates 14 1705 80
Mammals 0 459 45
Marine invertebrates/plants 0 104 0
Plant 1 80 167
Reptiles 1 0 3
With all covariates (Bowler for human)
# the cases we can compare
apply(trends[, .(Jtutrendrem0, REALM, tempave.sc, tempave_metab.sc, seas.sc, microclim.sc, temptrend.sc, mass.sc, speed.sc, lifespan.sc, consumerfrac.sc, endothermfrac.sc, nspp.sc, thermal_bias.sc, npp.sc, veg.sc, human_bowler.sc)], MARGIN = 2, FUN = function(x) sum(!is.na(x)))
Jtutrendrem0 REALM tempave.sc tempave_metab.sc seas.sc microclim.sc
39195 39195 36747 36747 36747 38291
temptrend.sc mass.sc speed.sc lifespan.sc consumerfrac.sc endothermfrac.sc
36747 39114 39082 38045 39195 39195
nspp.sc thermal_bias.sc npp.sc veg.sc human_bowler.sc
39195 36286 39089 39099 39195
i <- trends[, complete.cases(Jtutrendrem0, tempave.sc, tempave_metab.sc, seas.sc, microclim.sc, temptrend.sc, mass.sc, speed.sc, lifespan.sc, consumerfrac.sc, endothermfrac.sc, nspp.sc, thermal_bias.sc, npp.sc, veg.sc, human_bowler.sc)]
cat('Overall # time-series: ', sum(i), '\n')
Overall # time-series: 36017
cat('# studies: ', trends[i, length(unique(STUDY_ID))], '\n')
# studies: 231
cat('Data points: ', trends[i, sum(nyrBT)], '\n')
Data points: 243237
trends[i, table(REALM)]
REALM
Freshwater Marine Terrestrial
608 33098 2311
trends[i, table(taxa_mod)]
taxa_mod
All Amphibians Benthos Birds
1422 12 4288 7198
Fish Invertebrates Mammals Marine invertebrates/plants
20810 1517 495 104
Plant Reptiles
169 2
trends[i, table(taxa_mod, REALM)]
REALM
taxa_mod Freshwater Marine Terrestrial
All 0 1420 2
Amphibians 2 0 10
Benthos 0 4288 0
Birds 0 5116 2082
Fish 597 20213 0
Invertebrates 8 1443 66
Mammals 0 459 36
Marine invertebrates/plants 0 104 0
Plant 1 55 113
Reptiles 0 0 2
Try combinations of
And choose the one with lowest AIC (not run: takes a long time)
# fit models for variance structure
fixed <- formula(Jtutrendrem0 ~ temptrend_abs.sc*REALM +
temptrend_abs.sc*tsign +
temptrend_abs.sc*tempave_metab.sc +
temptrend_abs.sc*seas.sc +
temptrend_abs.sc*microclim.sc +
temptrend_abs.sc*mass.sc +
temptrend_abs.sc*speed.sc +
temptrend_abs.sc*consumerfrac.sc +
temptrend_abs.sc*nspp.sc +
temptrend_abs.sc*thermal_bias.sc:tsign +
temptrend_abs.sc*npp.sc +
temptrend_abs.sc*veg.sc +
temptrend_abs.sc*duration.sc +
temptrend_abs.sc*human_bowler.sc:REALM2)
i <- trends[, complete.cases(Jtutrendrem0, temptrend_abs.sc, REALM, tsign, tempave_metab.sc, seas.sc,
microclim.sc, mass.sc, speed.sc, consumerfrac.sc, nspp.sc,
thermal_bias.sc, npp.sc, veg.sc, human_bowler.sc)]
mods <- vector('list', 0)
mods[[1]] <- gls(fixed, data = trends[i,])
mods[[2]] <- gls(fixed, data = trends[i,], weights = varPower(-0.5, ~nyrBT))
mods[[3]] <- gls(fixed, data = trends[i,], weights = varPower(0.5, ~temptrend_abs.sc))
mods[[4]] <- lme(fixed, data = trends[i,], random = ~1|taxa_mod2, control = lmeControl(opt = "optim"))
mods[[5]] <- lme(fixed, data = trends[i,], random = ~1|STUDY_ID, control = lmeControl(opt = "optim"))
mods[[6]] <- lme(fixed, data = trends[i,], random = ~1|taxa_mod2/STUDY_ID, control = lmeControl(opt = "optim"))
mods[[7]] <- lme(fixed, data = trends[i,], random = ~1|STUDY_ID/rarefyID, control = lmeControl(opt = "optim"))
mods[[8]] <- lme(fixed, data = trends[i,], random = ~1|taxa_mod2/STUDY_ID/rarefyID, control = lmeControl(opt = "optim"))
mods[[9]] <- lme(fixed, data = trends[i,], random = ~temptrend_abs.sc | taxa_mod)
mods[[10]] <- lme(fixed, data = trends[i,], random = list(STUDY_ID = ~ temptrend_abs.sc, rarefyID = ~1)) # includes overdispersion. new formula so that random slope is only for study level (not enough data to extend to rarefyID).
mods[[11]] <- lme(fixed, data = trends[i,], random = list(STUDY_ID = ~ temptrend_abs.sc, rarefyID = ~1), weights = varPower(-0.5, ~nyrBT))
mods[[12]] <- lme(fixed, data = trends[i,], random = list(taxa_mod2 = ~ temptrend_abs.sc, STUDY_ID = ~ 1, rarefyID = ~1), weights = varPower(-0.5, ~nyrBT))
aics <- sapply(mods, AIC)
minaics <- aics - min(aics)
minaics
which.min(aics)
Chooses the random slopes (temptrend_abs) & intercepts for STUDY_ID, overdispersion, and variance scaled to number of years. We haven’t dealt with potential testing on the boundary issues here yet.
world <- map_data('world')
ggplot(world, aes(x = long, y = lat, group = group)) +
geom_polygon(fill = 'lightgray', color = 'white') +
geom_point(data = trends, aes(rarefyID_x, rarefyID_y, group = REALM, color = REALM), size = 0.5, alpha = 0.4) +
scale_color_brewer(palette="Set1", name = 'Realm') +
theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
panel.background = element_blank(), axis.line = element_line(colour = "black"),
legend.key=element_blank(),
axis.text=element_text(size=16),
axis.title=element_text(size=20)) +
labs(x = 'Longitude (°)', y = 'Latitude (°)')
Mostly northern hemisphere, but spread all over. Not so much in Africa or much of Asia.
##Average rates of turnover (without year 1)
trends[abs(temptrend) >= 0.5, temptrendtext1 := 'Changing >=0.5']
trends[abs(temptrend) <= 0.05, temptrendtext1 := 'Stable <=0.05']
trends[temptrend <= -0.5, temptrendtext2 := 'Cooling <= -0.5']
trends[temptrend >= 0.5, temptrendtext2 := 'Warming >= 0.5']
trends[abs(temptrend) >= 0.5 & abs(temptrend) < 1, temptrendtext3 := 'Slow Changing >=0.5 & <1']
trends[abs(temptrend) >= 1, temptrendtext3 := 'Fast Changing >=1']
trendsum1 <- trends[!is.na(temptrendtext1),
.(type = 'Jtu',
ave = mean(Jtutrendrem0, na.rm=TRUE),
se = sd(Jtutrendrem0, na.rm=TRUE)/sqrt(.N),
n = sum(!is.na(Jtutrendrem0))),
by = .(text = temptrendtext1)] # turnover per year for locations changing temperature
trendsum1 <- rbind(trendsum1, trends[!is.na(temptrendtext1),
.(type = 'Jbeta',
ave = mean(Jbetatrendrem0, na.rm=TRUE),
se = sd(Jbetatrendrem0, na.rm=TRUE)/sqrt(.N),
n = sum(!is.na(Jbetatrendrem0))),
by = .(text = temptrendtext1)])
trendsum1 <- rbind(trendsum1, trends[!is.na(temptrendtext1),
.(type = 'Horn',
ave = mean(Horntrendrem0, na.rm=TRUE),
se = sd(Horntrendrem0, na.rm=TRUE)/sqrt(.N),
n = sum(!is.na(Horntrendrem0))),
by = .(text = temptrendtext1)])
trendsum2 <- trends[!is.na(temptrendtext2),
.(type = 'Jtu',
ave = mean(Jtutrendrem0, na.rm=TRUE),
se = sd(Jtutrendrem0, na.rm=TRUE)/sqrt(.N),
n = sum(!is.na(Jtutrendrem0))),
by = .(text = temptrendtext2)] # inc. direction
trendsum2 <- rbind(trendsum2, trends[!is.na(temptrendtext2),
.(type = 'Jbeta',
ave = mean(Jbetatrendrem0, na.rm=TRUE),
se = sd(Jbetatrendrem0, na.rm=TRUE)/sqrt(.N),
n = sum(!is.na(Jbetatrendrem0))),
by = .(text = temptrendtext2)])
trendsum2 <- rbind(trendsum2, trends[!is.na(temptrendtext2),
.(type = 'Horn',
ave = mean(Horntrendrem0, na.rm=TRUE),
se = sd(Horntrendrem0, na.rm=TRUE)/sqrt(.N),
n = sum(!is.na(Horntrendrem0))),
by = .(text = temptrendtext2)])
trendsum3 <- trends[!is.na(temptrendtext3),
.(type = 'Jtu',
ave = mean(Jtutrendrem0, na.rm=TRUE),
se = sd(Jtutrendrem0, na.rm=TRUE)/sqrt(.N),
n = sum(!is.na(Jtutrendrem0))),
by = .(text = temptrendtext3)] # inc. rate
trendsum3 <- rbind(trendsum3, trends[!is.na(temptrendtext3),
.(type = 'Jbeta',
ave = mean(Jbetatrendrem0, na.rm=TRUE),
se = sd(Jbetatrendrem0, na.rm=TRUE)/sqrt(.N),
n = sum(!is.na(Jbetatrendrem0))),
by = .(text = temptrendtext3)])
trendsum3 <- rbind(trendsum3, trends[!is.na(temptrendtext3),
.(type = 'Horn',
ave = mean(Horntrendrem0, na.rm=TRUE),
se = sd(Horntrendrem0, na.rm=TRUE)/sqrt(.N),
n = sum(!is.na(Horntrendrem0))),
by = .(text = temptrendtext3)])
trendsum4 <- rbind(trendsum1, trendsum2, trendsum3)
setorder(trendsum4, type, text)
write.csv(trendsum4, file = 'output/trendsummary.csv', row.names = FALSE)
trendsum4
i4 <- trends[, complete.cases(Jtutrendrem0, REALM, temptrend)]
randef <- list(STUDY_ID = ~ abs(temptrend), rarefyID = ~1)
varef <- varPower(-0.5, ~nyrBT)
if(file.exists('temp/modonlyTtrendrem0.rds')){
modonlyTtrendrem0 <- readRDS('temp/modonlyTtrendrem0.rds')
} else {
modonlyTtrendrem0 <- lme(Jtutrendrem0 ~ abs(temptrend)*REALM,
random = randef, weights = varef, data = trends[i4,], method = 'REML')
saveRDS(modonlyTtrendrem0, file = 'temp/modonlyTtrendrem0.rds')
}
i5 <- trends[, complete.cases(Jbetatrendrem0, REALM, temptrend)]
if(file.exists('temp/modonlyTtrendJbetarem0.rds')){
modonlyTtrendJbetarem0 <- readRDS('temp/modonlyTtrendJbetarem0.rds')
} else {
modonlyTtrendJbetarem0 <- lme(Jbetatrendrem0 ~ abs(temptrend)*REALM,
random = randef, weights = varef, data = trends[i5,], method = 'REML',
control=lmeControl(msMaxIter = 100, maxIter = 100))
saveRDS(modonlyTtrendJbetarem0, file = 'temp/modonlyTtrendJbetarem0.rds')
}
i6 <- trends[, complete.cases(Horntrendrem0, REALM, temptrend)]
if(file.exists('temp/modonlyTtrendHornrem0.rds')){
modonlyTtrendHornrem0 <- readRDS('temp/modonlyTtrendHornrem0.rds')
} else {
modonlyTtrendHornrem0 <- lme(Horntrendrem0 ~ abs(temptrend)*REALM,
random = randef, weights = varef, data = trends[i6,], method = 'REML')
saveRDS(modonlyTtrendHornrem0, file = 'temp/modonlyTtrendHornrem0.rds')
}
summary(modonlyTtrendrem0)
Linear mixed-effects model fit by REML
Data: trends[i4, ]
Random effects:
Formula: ~abs(temptrend) | STUDY_ID
Structure: General positive-definite, Log-Cholesky parametrization
StdDev Corr
(Intercept) 0.007657053 (Intr)
abs(temptrend) 0.197650298 -0.935
Formula: ~1 | rarefyID %in% STUDY_ID
(Intercept) Residual
StdDev: 0.01097849 2.000161
Variance function:
Structure: Power of variance covariate
Formula: ~nyrBT
Parameter estimates:
power
-2.121022
Fixed effects: Jtutrendrem0 ~ abs(temptrend) * REALM
Correlation:
(Intr) abs(t) REALMM REALMT a():REALMM
abs(temptrend) -0.807
REALMMarine -0.947 0.764
REALMTerrestrial -0.901 0.727 0.853
abs(temptrend):REALMMarine 0.766 -0.949 -0.814 -0.690
abs(temptrend):REALMTerrestrial 0.733 -0.908 -0.693 -0.810 0.862
Standardized Within-Group Residuals:
Min Q1 Med Q3 Max
-6.57101792 -0.22892007 -0.01904447 0.27434430 5.64177564
Number of Observations: 36747
Number of Groups:
STUDY_ID rarefyID %in% STUDY_ID
292 36747
summary(modonlyTtrendJbetarem0)
Linear mixed-effects model fit by REML
Data: trends[i5, ]
Random effects:
Formula: ~abs(temptrend) | STUDY_ID
Structure: General positive-definite, Log-Cholesky parametrization
StdDev Corr
(Intercept) 0.005965236 (Intr)
abs(temptrend) 0.160013131 -0.038
Formula: ~1 | rarefyID %in% STUDY_ID
(Intercept) Residual
StdDev: 0.003861919 0.9688156
Variance function:
Structure: Power of variance covariate
Formula: ~nyrBT
Parameter estimates:
power
-1.887978
Fixed effects: Jbetatrendrem0 ~ abs(temptrend) * REALM
Correlation:
(Intr) abs(t) REALMM REALMT a():REALMM
abs(temptrend) -0.543
REALMMarine -0.941 0.511
REALMTerrestrial -0.906 0.492 0.852
abs(temptrend):REALMMarine 0.515 -0.948 -0.524 -0.467
abs(temptrend):REALMTerrestrial 0.494 -0.908 -0.464 -0.542 0.861
Standardized Within-Group Residuals:
Min Q1 Med Q3 Max
-8.57430409 -0.30896466 -0.02462766 0.32539894 8.23224466
Number of Observations: 36747
Number of Groups:
STUDY_ID rarefyID %in% STUDY_ID
292 36747
summary(modonlyTtrendHornrem0)
Linear mixed-effects model fit by REML
Data: trends[i6, ]
Random effects:
Formula: ~abs(temptrend) | STUDY_ID
Structure: General positive-definite, Log-Cholesky parametrization
StdDev Corr
(Intercept) 0.01201968 (Intr)
abs(temptrend) 0.25314398 0.016
Formula: ~1 | rarefyID %in% STUDY_ID
(Intercept) Residual
StdDev: 0.01882813 2.441788
Variance function:
Structure: Power of variance covariate
Formula: ~nyrBT
Parameter estimates:
power
-2.318769
Fixed effects: Horntrendrem0 ~ abs(temptrend) * REALM
Correlation:
(Intr) abs(t) REALMM REALMT a():REALMM
abs(temptrend) -0.472
REALMMarine -0.944 0.446
REALMTerrestrial -0.899 0.424 0.848
abs(temptrend):REALMMarine 0.447 -0.945 -0.455 -0.401
abs(temptrend):REALMTerrestrial 0.428 -0.906 -0.404 -0.473 0.856
Standardized Within-Group Residuals:
Min Q1 Med Q3 Max
-5.75457482 -0.22483445 -0.02254226 0.23615730 5.73488343
Number of Observations: 36005
Number of Groups:
STUDY_ID rarefyID %in% STUDY_ID
257 36005
colors <- brewer.pal(3, 'Dark2')
# make table of coefficients
coefs1 <- as.data.frame(summary(modonlyTtrendrem0)$tTable)
coefs2 <- as.data.frame(summary(modonlyTtrendJbetarem0)$tTable)
coefs3 <- as.data.frame(summary(modonlyTtrendHornrem0)$tTable)
coefs1$mod <- 'Jtu'
coefs2$mod <- 'Jbeta'
coefs3$mod <- 'Horn'
rows1 <- which(grepl('temptrend', rownames(coefs1))) # extract temperature effect
cols <- c('Value', 'Std.Error', 'mod')
allcoefs <- rbind(coefs1[rows1, cols], coefs2[rows1, cols], coefs3[rows1, cols])
allcoefs$Value[grepl('REALMMarine', rownames(allcoefs))] <-
allcoefs$Value[grepl('REALMMarine', rownames(allcoefs))] +
allcoefs$Value[!grepl('REALM', rownames(allcoefs))] # add intercept to marine effects
allcoefs$Value[grepl('REALMTerrestrial', rownames(allcoefs))] <-
allcoefs$Value[grepl('REALMTerrestrial', rownames(allcoefs))] +
allcoefs$Value[!grepl('REALM', rownames(allcoefs))] # add intercept to terrestrial effects
allcoefs$lCI <- allcoefs$Value - allcoefs$Std.Error # lower confidence interval
allcoefs$uCI <- allcoefs$Value + allcoefs$Std.Error
allcoefs$y <- c(3, 2, 1) + rep(c(0, -0.1, -0.2), c(3, 3, 3)) # y-values
allcoefs$col <- c(rep(colors[1], 3), rep(colors[2], 3), rep(colors[3], 3))
allcoefs$realm <- rep(c('Freshwater', 'Marine', 'Terrestrial'), 3)
par(las = 1, mai = c(0.8, 2, 0.1, 0.1))
plot(0,0, col = 'white', xlim=c(-0.1, 0.85), ylim = c(0.5,3),
yaxt='n', xlab = 'Turnover per |°C/yr|', ylab ='')
axis(2, at = 3:1, labels = c('Freshwater', 'Marine', 'Terrestrial'), cex.axis = 0.7)
abline(v = 0, col = 'grey')
for(i in 1:nrow(allcoefs)){
with(allcoefs[i, ], points(Value, y, pch = 16, col = col))
with(allcoefs[i, ], lines(x = c(lCI, uCI), y = c(y, y), col = col))
}
legend('bottomright', col = colors, lwd = 1, pch = 16,
legend = c('Jaccard turnover', 'Jaccard total', 'Horn-Morisita',
'Jaccard turnover rem0', 'Jaccard total rem0', 'Horn-Morisita rem0'))
Try static covariates plus interactions of abs temperature trend with each covariate:
Except for thermal bias: interact with temperature trend (not abs)
Bowler has lower AIC.
# using Bowler for human impact
i1 <- trends[, complete.cases(Jtutrendrem0, REALM, tempave_metab.sc, seas.sc, microclim.sc,
temptrend_abs.sc, mass.sc, speed.sc,
consumerfrac.sc, nspp.sc, thermal_bias.sc, npp.sc,
veg.sc, duration.sc, human_bowler.sc, human_footprint.sc)]
randef <- list(STUDY_ID = ~ temptrend_abs.sc, rarefyID = ~1)
varef <- varPower(-0.5, ~nyrBT)
if(file.exists('temp/modTfullbowlerrem0.rds')){
modTfullbowlerrem0 <- readRDS('temp/modTfullbowlerrem0.rds')
} else {
modTfullbowlerrem0 <- lme(Jtutrendrem0 ~ temptrend_abs.sc*REALM +
temptrend_abs.sc*tsign +
temptrend_abs.sc*tempave_metab.sc +
temptrend_abs.sc*seas.sc +
temptrend_abs.sc*microclim.sc +
temptrend_abs.sc*mass.sc +
temptrend_abs.sc*speed.sc +
temptrend_abs.sc*consumerfrac.sc +
temptrend_abs.sc*nspp.sc +
temptrend_abs.sc*thermal_bias.sc:tsign +
temptrend_abs.sc*npp.sc +
temptrend_abs.sc*veg.sc +
temptrend_abs.sc*duration.sc +
temptrend_abs.sc*human_bowler.sc:REALM2,
random = randef, weights = varef, data = trends[i1,], method = 'REML')
saveRDS(modTfullbowlerrem0, file = 'temp/modTfullbowlerrem0.rds')
}
# using Venter/Halpern for human impact
if(file.exists('temp/modTfullfootprintrem0.rds')){
modTfullfootprintrem0 <- readRDS('temp/modTfullfootprintrem0.rds')
} else {
modTfullfootprintrem0 <- lme(Jtutrendrem0 ~ temptrend_abs.sc*REALM +
temptrend_abs.sc*tsign +
temptrend_abs.sc*tempave_metab.sc +
temptrend_abs.sc*seas.sc +
temptrend_abs.sc*microclim.sc +
temptrend_abs.sc*mass.sc +
temptrend_abs.sc*speed.sc +
temptrend_abs.sc*consumerfrac.sc +
temptrend_abs.sc*nspp.sc +
temptrend_abs.sc*thermal_bias.sc:tsign +
temptrend_abs.sc*npp.sc +
temptrend_abs.sc*veg.sc +
temptrend_abs.sc*duration.sc +
temptrend_abs.sc*human_footprint.sc:REALM2,
random = randef, weights = varef, data = trends[i1,], method = 'REML',
control = lmeControl(maxIter = 100, msMaxIter = 100, niterEM = 50, msMaxEval = 500))
saveRDS(modTfullfootprintrem0, file = 'temp/modTfullfootprintrem0.rds')
}
AIC(modTfullbowlerrem0, modTfullfootprintrem0)
NA
i1 <- trends[, complete.cases(Jtutrendrem0, REALM, tempave_metab.sc, seas.sc, microclim.sc,
temptrend_abs.sc, mass.sc, speed.sc,
consumerfrac.sc, nspp.sc, thermal_bias.sc, npp.sc,
veg.sc, duration.sc, human_bowler.sc)]
i2 <- trends[, complete.cases(Jbetatrendrem0, REALM, tempave_metab.sc, seas.sc, microclim.sc,
temptrend_abs.sc, mass.sc, speed.sc,
consumerfrac.sc, nspp.sc, thermal_bias.sc, npp.sc,
veg.sc, duration.sc, human_bowler.sc)]
i3 <- trends[, complete.cases(Horntrendrem0, REALM, tempave_metab.sc, seas.sc, microclim.sc,
temptrend_abs.sc, mass.sc, speed.sc,
consumerfrac.sc, nspp.sc, thermal_bias.sc, npp.sc,
veg.sc, duration.sc, human_bowler.sc)]
randef <- list(STUDY_ID = ~ temptrend_abs.sc, rarefyID = ~1)
varef <- varPower(-0.5, ~nyrBT)
# full models
if(file.exists('temp/modTfullJturem0.rds')){
modTfullJturem0 <- readRDS('temp/modTfullJturem0.rds')
} else {
modTfullJturem0 <- lme(Jtutrendrem0 ~ temptrend_abs.sc*REALM +
temptrend_abs.sc*tsign +
temptrend_abs.sc*tempave_metab.sc +
temptrend_abs.sc*seas.sc +
temptrend_abs.sc*microclim.sc +
temptrend_abs.sc*mass.sc +
temptrend_abs.sc*speed.sc +
temptrend_abs.sc*consumerfrac.sc +
temptrend_abs.sc*nspp.sc +
temptrend_abs.sc*thermal_bias.sc:tsign +
temptrend_abs.sc*npp.sc +
temptrend_abs.sc*veg.sc +
temptrend_abs.sc*duration.sc +
temptrend_abs.sc*human_bowler.sc:REALM2,
random = randef, weights = varef, data = trends[i2,], method = 'REML')
saveRDS(modTfullJturem0, file = 'temp/modTfullJturem0.rds')
}
if(file.exists('temp/modTfullJbetarem0.rds')){
modTfullJbetarem0 <- readRDS('temp/modTfullJbetarem0.rds')
} else {
modTfullJbetarem0 <- lme(Jbetatrendrem0 ~ temptrend_abs.sc*REALM +
temptrend_abs.sc*tsign +
temptrend_abs.sc*tempave_metab.sc +
temptrend_abs.sc*seas.sc +
temptrend_abs.sc*microclim.sc +
temptrend_abs.sc*mass.sc +
temptrend_abs.sc*speed.sc +
temptrend_abs.sc*consumerfrac.sc +
temptrend_abs.sc*nspp.sc +
temptrend_abs.sc*thermal_bias.sc:tsign +
temptrend_abs.sc*npp.sc +
temptrend_abs.sc*veg.sc +
temptrend_abs.sc*duration.sc +
temptrend_abs.sc*human_bowler.sc:REALM2,
random = randef, weights = varef, data = trends[i2,], method = 'REML')
saveRDS(modTfullJbetarem0, file = 'temp/modTfullJbetarem0.rds')
}
if(file.exists('temp/modTfullHornrem0.rds')){
modTfullHornrem0 <- readRDS('temp/modTfullHornrem0.rds')
} else {
modTfullHornrem0 <- lme(Horntrendrem0 ~ temptrend_abs.sc*REALM +
temptrend_abs.sc*tsign +
temptrend_abs.sc*tempave_metab.sc +
temptrend_abs.sc*seas.sc +
temptrend_abs.sc*microclim.sc +
temptrend_abs.sc*mass.sc +
temptrend_abs.sc*speed.sc +
temptrend_abs.sc*consumerfrac.sc +
temptrend_abs.sc*nspp.sc +
temptrend_abs.sc*thermal_bias.sc:tsign +
temptrend_abs.sc*npp.sc +
temptrend_abs.sc*veg.sc +
temptrend_abs.sc*duration.sc +
temptrend_abs.sc*human_bowler.sc:REALM2,
random = randef, weights = varef, data = trends[i3,], method = 'REML')
saveRDS(modTfullHornrem0, file = 'temp/modTfullHornrem0.rds')
}
summary(modTfullJturem0)
Linear mixed-effects model fit by REML
Data: trends[i2, ]
Random effects:
Formula: ~temptrend_abs.sc | STUDY_ID
Structure: General positive-definite, Log-Cholesky parametrization
StdDev Corr
(Intercept) 0.009402743 (Intr)
temptrend_abs.sc 0.024575808 -0.966
Formula: ~1 | rarefyID %in% STUDY_ID
(Intercept) Residual
StdDev: 0.01091239 2.006389
Variance function:
Structure: Power of variance covariate
Formula: ~nyrBT
Parameter estimates:
power
-2.129145
Fixed effects: Jtutrendrem0 ~ temptrend_abs.sc * REALM + temptrend_abs.sc * tsign + temptrend_abs.sc * tempave_metab.sc + temptrend_abs.sc * seas.sc + temptrend_abs.sc * microclim.sc + temptrend_abs.sc * mass.sc + temptrend_abs.sc * speed.sc + temptrend_abs.sc * consumerfrac.sc + temptrend_abs.sc * nspp.sc + temptrend_abs.sc * thermal_bias.sc:tsign + temptrend_abs.sc * npp.sc + temptrend_abs.sc * veg.sc + temptrend_abs.sc * duration.sc + temptrend_abs.sc * human_bowler.sc:REALM2
Correlation:
(Intr) tmpt_. REALMM REALMT tsign1 tmpv_. ses.sc mcrcl. mss.sc
temptrend_abs.sc -0.797
REALMMarine -0.955 0.757
REALMTerrestrial -0.683 0.574 0.634
tsign1 -0.095 0.063 0.007 0.012
tempave_metab.sc 0.061 -0.037 -0.053 -0.242 0.074
seas.sc -0.150 0.143 0.202 -0.097 -0.070 0.138
microclim.sc -0.068 0.047 0.077 0.006 0.015 -0.157 0.097
mass.sc 0.061 -0.042 -0.036 -0.038 -0.019 0.100 0.127 -0.001
speed.sc 0.107 -0.093 -0.057 -0.084 -0.073 -0.194 -0.055 0.070 -0.437
consumerfrac.sc -0.028 0.022 0.017 0.133 0.014 -0.135 -0.055 0.017 0.016
nspp.sc 0.020 0.000 -0.074 -0.066 0.049 -0.154 -0.037 -0.113 -0.010
npp.sc 0.041 -0.044 -0.061 0.054 0.041 0.037 -0.136 -0.187 -0.027
veg.sc -0.578 0.387 0.599 0.024 -0.006 0.007 0.080 -0.010 0.021
duration.sc -0.037 0.008 0.032 0.016 -0.160 0.085 -0.006 -0.016 -0.057
temptrend_abs.sc:REALMMarine 0.764 -0.951 -0.804 -0.534 -0.014 0.030 -0.184 -0.056 0.020
temptrend_abs.sc:REALMTerrestrial 0.542 -0.693 -0.499 -0.820 -0.018 0.182 0.078 0.024 0.033
temptrend_abs.sc:tsign1 0.067 -0.140 -0.022 -0.014 -0.507 -0.056 0.012 -0.006 -0.005
temptrend_abs.sc:tempave_metab.sc -0.037 0.042 0.028 0.171 -0.058 -0.788 -0.106 0.091 -0.066
temptrend_abs.sc:seas.sc 0.145 -0.158 -0.183 0.095 0.053 -0.100 -0.777 -0.099 -0.081
temptrend_abs.sc:microclim.sc 0.038 -0.062 -0.047 0.020 -0.014 0.088 -0.068 -0.760 0.028
temptrend_abs.sc:mass.sc -0.040 0.048 0.010 0.020 -0.002 -0.086 -0.066 0.019 -0.701
temptrend_abs.sc:speed.sc -0.084 0.104 0.040 0.073 0.069 0.167 0.031 -0.041 0.266
temptrend_abs.sc:consumerfrac.sc 0.030 -0.037 -0.018 -0.117 -0.007 0.105 0.038 0.009 0.006
temptrend_abs.sc:nspp.sc 0.009 0.008 0.038 0.037 -0.033 0.143 0.035 0.069 0.033
tsign-1:thermal_bias.sc 0.061 -0.041 -0.057 -0.046 -0.078 0.132 -0.217 -0.015 -0.043
tsign1:thermal_bias.sc 0.095 -0.074 -0.103 -0.097 0.063 0.223 -0.330 -0.100 -0.043
temptrend_abs.sc:npp.sc -0.039 0.065 0.059 -0.051 -0.028 -0.007 0.116 0.168 -0.004
temptrend_abs.sc:veg.sc 0.411 -0.507 -0.431 0.022 -0.008 -0.018 -0.115 0.003 -0.018
spd.sc cnsmr. nspp.s npp.sc veg.sc drtn.s t_.:REALMM t_.:REALMT
temptrend_abs.sc
REALMMarine
REALMTerrestrial
tsign1
tempave_metab.sc
seas.sc
microclim.sc
mass.sc
speed.sc
consumerfrac.sc -0.144
nspp.sc 0.184 0.094
npp.sc 0.125 -0.045 -0.188
veg.sc -0.019 -0.010 0.024 -0.178
duration.sc -0.009 0.005 -0.252 0.062 -0.012
temptrend_abs.sc:REALMMarine 0.047 -0.015 0.046 0.064 -0.406 -0.018
temptrend_abs.sc:REALMTerrestrial 0.068 -0.104 0.025 -0.047 0.019 -0.005 0.639
temptrend_abs.sc:tsign1 0.041 -0.007 -0.029 -0.038 -0.018 0.031 0.044 0.011
temptrend_abs.sc:tempave_metab.sc 0.134 0.116 0.154 -0.031 -0.012 -0.031 -0.027 -0.228
temptrend_abs.sc:seas.sc 0.032 0.029 0.038 0.123 -0.109 -0.027 0.207 -0.162
temptrend_abs.sc:microclim.sc -0.055 0.002 0.074 0.183 0.006 0.011 0.077 -0.051
temptrend_abs.sc:mass.sc 0.315 0.008 0.031 -0.007 -0.007 0.044 -0.014 -0.004
temptrend_abs.sc:speed.sc -0.717 0.085 -0.165 -0.064 -0.006 0.001 -0.055 -0.094
temptrend_abs.sc:consumerfrac.sc 0.120 -0.773 -0.069 0.022 0.005 -0.035 0.021 0.127
temptrend_abs.sc:nspp.sc -0.159 -0.046 -0.749 0.118 -0.037 0.195 -0.070 -0.068
tsign-1:thermal_bias.sc -0.006 -0.001 -0.035 0.001 -0.012 0.083 0.050 0.034
tsign1:thermal_bias.sc -0.009 -0.024 -0.044 -0.057 0.000 0.084 0.073 0.084
temptrend_abs.sc:npp.sc -0.064 0.004 0.113 -0.741 0.143 -0.043 -0.103 0.085
temptrend_abs.sc:veg.sc 0.010 0.011 -0.024 0.173 -0.733 0.003 0.537 -0.033
tm_.:1 tm_.:_. tmptrnd_bs.sc:ss. tmptrnd_bs.sc:mc.
temptrend_abs.sc
REALMMarine
REALMTerrestrial
tsign1
tempave_metab.sc
seas.sc
microclim.sc
mass.sc
speed.sc
consumerfrac.sc
nspp.sc
npp.sc
veg.sc
duration.sc
temptrend_abs.sc:REALMMarine
temptrend_abs.sc:REALMTerrestrial
temptrend_abs.sc:tsign1
temptrend_abs.sc:tempave_metab.sc 0.052
temptrend_abs.sc:seas.sc -0.021 0.109
temptrend_abs.sc:microclim.sc 0.020 -0.040 0.113
temptrend_abs.sc:mass.sc 0.001 0.168 0.052 -0.043
temptrend_abs.sc:speed.sc -0.035 -0.331 -0.003 0.043
temptrend_abs.sc:consumerfrac.sc 0.032 -0.124 -0.063 -0.027
temptrend_abs.sc:nspp.sc 0.029 -0.138 -0.040 -0.043
tsign-1:thermal_bias.sc -0.042 -0.114 0.159 0.007
tsign1:thermal_bias.sc 0.001 -0.216 0.205 0.042
temptrend_abs.sc:npp.sc 0.003 0.030 -0.182 -0.312
temptrend_abs.sc:veg.sc 0.052 0.004 0.149 0.028
tmptrnd_bs.sc:ms. tmptrnd_bs.sc:sp. tmptrnd_bs.sc:c.
temptrend_abs.sc
REALMMarine
REALMTerrestrial
tsign1
tempave_metab.sc
seas.sc
microclim.sc
mass.sc
speed.sc
consumerfrac.sc
nspp.sc
npp.sc
veg.sc
duration.sc
temptrend_abs.sc:REALMMarine
temptrend_abs.sc:REALMTerrestrial
temptrend_abs.sc:tsign1
temptrend_abs.sc:tempave_metab.sc
temptrend_abs.sc:seas.sc
temptrend_abs.sc:microclim.sc
temptrend_abs.sc:mass.sc
temptrend_abs.sc:speed.sc -0.475
temptrend_abs.sc:consumerfrac.sc -0.043 -0.120
temptrend_abs.sc:nspp.sc 0.003 0.183 0.085
tsign-1:thermal_bias.sc 0.021 0.018 -0.005
tsign1:thermal_bias.sc 0.007 0.030 0.020
temptrend_abs.sc:npp.sc 0.039 0.037 -0.017
temptrend_abs.sc:veg.sc 0.004 0.000 -0.011
tmptrnd_bs.sc:ns. t-1:_. ts1:_. tmptrnd_bs.sc:np.
temptrend_abs.sc
REALMMarine
REALMTerrestrial
tsign1
tempave_metab.sc
seas.sc
microclim.sc
mass.sc
speed.sc
consumerfrac.sc
nspp.sc
npp.sc
veg.sc
duration.sc
temptrend_abs.sc:REALMMarine
temptrend_abs.sc:REALMTerrestrial
temptrend_abs.sc:tsign1
temptrend_abs.sc:tempave_metab.sc
temptrend_abs.sc:seas.sc
temptrend_abs.sc:microclim.sc
temptrend_abs.sc:mass.sc
temptrend_abs.sc:speed.sc
temptrend_abs.sc:consumerfrac.sc
temptrend_abs.sc:nspp.sc
tsign-1:thermal_bias.sc 0.018
tsign1:thermal_bias.sc 0.032 0.357
temptrend_abs.sc:npp.sc -0.114 -0.002 0.055
temptrend_abs.sc:veg.sc 0.017 0.020 -0.012 -0.250
tmptrnd_bs.sc:v. tmptrnd_bs.sc:d. h_.:REALM2T h_.:REALM2M t_.:-1
temptrend_abs.sc
REALMMarine
REALMTerrestrial
tsign1
tempave_metab.sc
seas.sc
microclim.sc
mass.sc
speed.sc
consumerfrac.sc
nspp.sc
npp.sc
veg.sc
duration.sc
temptrend_abs.sc:REALMMarine
temptrend_abs.sc:REALMTerrestrial
temptrend_abs.sc:tsign1
temptrend_abs.sc:tempave_metab.sc
temptrend_abs.sc:seas.sc
temptrend_abs.sc:microclim.sc
temptrend_abs.sc:mass.sc
temptrend_abs.sc:speed.sc
temptrend_abs.sc:consumerfrac.sc
temptrend_abs.sc:nspp.sc
tsign-1:thermal_bias.sc
tsign1:thermal_bias.sc
temptrend_abs.sc:npp.sc
temptrend_abs.sc:veg.sc
t_.:1: t_.:_.:REALM2T
temptrend_abs.sc
REALMMarine
REALMTerrestrial
tsign1
tempave_metab.sc
seas.sc
microclim.sc
mass.sc
speed.sc
consumerfrac.sc
nspp.sc
npp.sc
veg.sc
duration.sc
temptrend_abs.sc:REALMMarine
temptrend_abs.sc:REALMTerrestrial
temptrend_abs.sc:tsign1
temptrend_abs.sc:tempave_metab.sc
temptrend_abs.sc:seas.sc
temptrend_abs.sc:microclim.sc
temptrend_abs.sc:mass.sc
temptrend_abs.sc:speed.sc
temptrend_abs.sc:consumerfrac.sc
temptrend_abs.sc:nspp.sc
tsign-1:thermal_bias.sc
tsign1:thermal_bias.sc
temptrend_abs.sc:npp.sc
temptrend_abs.sc:veg.sc
[ reached getOption("max.print") -- omitted 7 rows ]
Standardized Within-Group Residuals:
Min Q1 Med Q3 Max
-6.64180587 -0.23617979 -0.02235224 0.26661608 5.42260805
Number of Observations: 36017
Number of Groups:
STUDY_ID rarefyID %in% STUDY_ID
231 36017
summary(modTfullJbetarem0)
Linear mixed-effects model fit by REML
Data: trends[i2, ]
Random effects:
Formula: ~temptrend_abs.sc | STUDY_ID
Structure: General positive-definite, Log-Cholesky parametrization
StdDev Corr
(Intercept) 0.00722145 (Intr)
temptrend_abs.sc 0.01729128 -0.058
Formula: ~1 | rarefyID %in% STUDY_ID
(Intercept) Residual
StdDev: 0.003744118 0.9597427
Variance function:
Structure: Power of variance covariate
Formula: ~nyrBT
Parameter estimates:
power
-1.892596
Fixed effects: Jbetatrendrem0 ~ temptrend_abs.sc * REALM + temptrend_abs.sc * tsign + temptrend_abs.sc * tempave_metab.sc + temptrend_abs.sc * seas.sc + temptrend_abs.sc * microclim.sc + temptrend_abs.sc * mass.sc + temptrend_abs.sc * speed.sc + temptrend_abs.sc * consumerfrac.sc + temptrend_abs.sc * nspp.sc + temptrend_abs.sc * thermal_bias.sc:tsign + temptrend_abs.sc * npp.sc + temptrend_abs.sc * veg.sc + temptrend_abs.sc * duration.sc + temptrend_abs.sc * human_bowler.sc:REALM2
Correlation:
(Intr) tmpt_. REALMM REALMT tsign1 tmpv_. ses.sc mcrcl. mss.sc
temptrend_abs.sc -0.573
REALMMarine -0.947 0.551
REALMTerrestrial -0.752 0.385 0.701
tsign1 -0.084 0.047 0.004 0.001
tempave_metab.sc 0.100 -0.026 -0.084 -0.244 0.098
seas.sc -0.131 0.077 0.178 -0.069 -0.074 0.088
microclim.sc -0.078 0.060 0.090 0.022 -0.001 -0.183 0.138
mass.sc 0.095 -0.010 -0.071 -0.043 0.001 0.089 0.091 0.007
speed.sc 0.081 -0.063 -0.041 -0.088 -0.086 -0.110 -0.014 0.039 -0.493
consumerfrac.sc -0.012 0.017 0.010 0.096 -0.022 -0.105 -0.031 0.020 0.012
nspp.sc 0.007 -0.032 -0.062 -0.038 0.049 -0.200 -0.033 -0.135 -0.054
npp.sc 0.025 -0.013 -0.040 0.032 0.066 0.073 -0.077 -0.140 -0.028
veg.sc -0.442 0.365 0.462 0.011 -0.014 -0.003 0.073 -0.003 0.018
duration.sc -0.041 0.009 0.031 -0.003 -0.144 0.129 -0.003 -0.024 -0.042
temptrend_abs.sc:REALMMarine 0.554 -0.951 -0.570 -0.361 -0.009 0.023 -0.099 -0.066 0.000
temptrend_abs.sc:REALMTerrestrial 0.377 -0.740 -0.350 -0.552 0.001 0.148 0.116 0.024 -0.011
temptrend_abs.sc:tsign1 0.055 -0.127 -0.022 0.002 -0.442 -0.055 0.003 -0.006 -0.004
temptrend_abs.sc:tempave_metab.sc -0.001 0.056 -0.009 0.132 -0.104 -0.539 -0.130 0.018 -0.066
temptrend_abs.sc:seas.sc 0.079 -0.108 -0.106 0.104 0.050 -0.090 -0.726 -0.122 -0.063
temptrend_abs.sc:microclim.sc 0.053 -0.078 -0.061 0.002 -0.009 0.112 -0.091 -0.780 0.012
temptrend_abs.sc:mass.sc -0.018 0.040 0.012 -0.009 -0.004 -0.077 -0.056 0.024 -0.577
temptrend_abs.sc:speed.sc -0.070 0.093 0.057 0.080 0.074 0.129 0.055 -0.019 0.240
temptrend_abs.sc:consumerfrac.sc 0.010 -0.032 -0.009 -0.076 0.016 0.077 0.031 0.012 0.003
temptrend_abs.sc:nspp.sc -0.023 0.016 0.048 0.045 -0.026 0.119 0.035 0.070 0.011
tsign-1:thermal_bias.sc 0.066 -0.022 -0.062 -0.049 -0.068 0.135 -0.240 -0.022 -0.040
tsign1:thermal_bias.sc 0.122 -0.044 -0.126 -0.104 0.066 0.252 -0.437 -0.133 -0.017
temptrend_abs.sc:npp.sc -0.002 0.057 0.015 -0.054 -0.040 -0.016 0.065 0.155 0.001
temptrend_abs.sc:veg.sc 0.351 -0.443 -0.367 0.020 -0.001 -0.016 -0.088 -0.009 -0.010
spd.sc cnsmr. nspp.s npp.sc veg.sc drtn.s t_.:REALMM t_.:REALMT
temptrend_abs.sc
REALMMarine
REALMTerrestrial
tsign1
tempave_metab.sc
seas.sc
microclim.sc
mass.sc
speed.sc
consumerfrac.sc -0.089
nspp.sc 0.212 0.100
npp.sc 0.163 -0.052 -0.198
veg.sc -0.024 -0.018 0.023 -0.204
duration.sc -0.033 0.012 -0.240 0.077 -0.012
temptrend_abs.sc:REALMMarine 0.039 -0.010 0.063 0.038 -0.386 -0.008
temptrend_abs.sc:REALMTerrestrial 0.076 -0.073 0.049 -0.055 0.021 0.007 0.690
temptrend_abs.sc:tsign1 0.033 0.004 -0.025 -0.056 -0.025 0.020 0.040 0.006
temptrend_abs.sc:tempave_metab.sc 0.142 0.085 0.123 -0.020 -0.009 -0.054 -0.041 -0.239
temptrend_abs.sc:seas.sc 0.014 0.028 0.045 0.090 -0.086 -0.036 0.149 -0.173
temptrend_abs.sc:microclim.sc -0.029 -0.008 0.083 0.167 -0.009 0.011 0.090 -0.058
temptrend_abs.sc:mass.sc 0.282 0.015 0.014 -0.015 -0.010 0.055 -0.003 0.016
temptrend_abs.sc:speed.sc -0.601 0.071 -0.148 -0.068 0.004 0.014 -0.042 -0.098
temptrend_abs.sc:consumerfrac.sc 0.080 -0.717 -0.065 0.026 0.009 -0.023 0.019 0.109
temptrend_abs.sc:nspp.sc -0.153 -0.045 -0.640 0.108 -0.028 0.167 -0.078 -0.068
tsign-1:thermal_bias.sc 0.027 0.006 -0.048 0.004 -0.012 0.085 0.029 0.020
tsign1:thermal_bias.sc 0.026 -0.030 -0.081 -0.042 0.000 0.105 0.035 0.057
temptrend_abs.sc:npp.sc -0.085 0.016 0.109 -0.733 0.163 -0.056 -0.093 0.085
temptrend_abs.sc:veg.sc 0.006 0.013 -0.026 0.181 -0.813 0.012 0.474 -0.031
tm_.:1 tm_.:_. tmptrnd_bs.sc:ss. tmptrnd_bs.sc:mc.
temptrend_abs.sc
REALMMarine
REALMTerrestrial
tsign1
tempave_metab.sc
seas.sc
microclim.sc
mass.sc
speed.sc
consumerfrac.sc
nspp.sc
npp.sc
veg.sc
duration.sc
temptrend_abs.sc:REALMMarine
temptrend_abs.sc:REALMTerrestrial
temptrend_abs.sc:tsign1
temptrend_abs.sc:tempave_metab.sc 0.047
temptrend_abs.sc:seas.sc -0.018 0.080
temptrend_abs.sc:microclim.sc 0.009 0.029 0.157
temptrend_abs.sc:mass.sc 0.009 0.140 0.042 -0.046
temptrend_abs.sc:speed.sc -0.031 -0.308 0.027 0.032
temptrend_abs.sc:consumerfrac.sc 0.018 -0.106 -0.070 -0.031
temptrend_abs.sc:nspp.sc 0.024 -0.134 -0.035 -0.050
tsign-1:thermal_bias.sc -0.046 -0.045 0.153 0.009
tsign1:thermal_bias.sc 0.016 -0.124 0.210 0.051
temptrend_abs.sc:npp.sc 0.025 0.053 -0.193 -0.305
temptrend_abs.sc:veg.sc 0.047 -0.014 0.141 0.056
tmptrnd_bs.sc:ms. tmptrnd_bs.sc:sp. tmptrnd_bs.sc:c.
temptrend_abs.sc
REALMMarine
REALMTerrestrial
tsign1
tempave_metab.sc
seas.sc
microclim.sc
mass.sc
speed.sc
consumerfrac.sc
nspp.sc
npp.sc
veg.sc
duration.sc
temptrend_abs.sc:REALMMarine
temptrend_abs.sc:REALMTerrestrial
temptrend_abs.sc:tsign1
temptrend_abs.sc:tempave_metab.sc
temptrend_abs.sc:seas.sc
temptrend_abs.sc:microclim.sc
temptrend_abs.sc:mass.sc
temptrend_abs.sc:speed.sc -0.446
temptrend_abs.sc:consumerfrac.sc -0.050 -0.119
temptrend_abs.sc:nspp.sc -0.002 0.166 0.084
tsign-1:thermal_bias.sc 0.019 -0.008 -0.009
tsign1:thermal_bias.sc 0.013 -0.009 0.019
temptrend_abs.sc:npp.sc 0.047 0.029 -0.021
temptrend_abs.sc:veg.sc 0.005 0.012 -0.016
tmptrnd_bs.sc:ns. t-1:_. ts1:_. tmptrnd_bs.sc:np.
temptrend_abs.sc
REALMMarine
REALMTerrestrial
tsign1
tempave_metab.sc
seas.sc
microclim.sc
mass.sc
speed.sc
consumerfrac.sc
nspp.sc
npp.sc
veg.sc
duration.sc
temptrend_abs.sc:REALMMarine
temptrend_abs.sc:REALMTerrestrial
temptrend_abs.sc:tsign1
temptrend_abs.sc:tempave_metab.sc
temptrend_abs.sc:seas.sc
temptrend_abs.sc:microclim.sc
temptrend_abs.sc:mass.sc
temptrend_abs.sc:speed.sc
temptrend_abs.sc:consumerfrac.sc
temptrend_abs.sc:nspp.sc
tsign-1:thermal_bias.sc 0.017
tsign1:thermal_bias.sc 0.025 0.340
temptrend_abs.sc:npp.sc -0.114 0.006 0.081
temptrend_abs.sc:veg.sc 0.013 0.012 -0.026 -0.281
tmptrnd_bs.sc:v. tmptrnd_bs.sc:d. h_.:REALM2T h_.:REALM2M t_.:-1
temptrend_abs.sc
REALMMarine
REALMTerrestrial
tsign1
tempave_metab.sc
seas.sc
microclim.sc
mass.sc
speed.sc
consumerfrac.sc
nspp.sc
npp.sc
veg.sc
duration.sc
temptrend_abs.sc:REALMMarine
temptrend_abs.sc:REALMTerrestrial
temptrend_abs.sc:tsign1
temptrend_abs.sc:tempave_metab.sc
temptrend_abs.sc:seas.sc
temptrend_abs.sc:microclim.sc
temptrend_abs.sc:mass.sc
temptrend_abs.sc:speed.sc
temptrend_abs.sc:consumerfrac.sc
temptrend_abs.sc:nspp.sc
tsign-1:thermal_bias.sc
tsign1:thermal_bias.sc
temptrend_abs.sc:npp.sc
temptrend_abs.sc:veg.sc
t_.:1: t_.:_.:REALM2T
temptrend_abs.sc
REALMMarine
REALMTerrestrial
tsign1
tempave_metab.sc
seas.sc
microclim.sc
mass.sc
speed.sc
consumerfrac.sc
nspp.sc
npp.sc
veg.sc
duration.sc
temptrend_abs.sc:REALMMarine
temptrend_abs.sc:REALMTerrestrial
temptrend_abs.sc:tsign1
temptrend_abs.sc:tempave_metab.sc
temptrend_abs.sc:seas.sc
temptrend_abs.sc:microclim.sc
temptrend_abs.sc:mass.sc
temptrend_abs.sc:speed.sc
temptrend_abs.sc:consumerfrac.sc
temptrend_abs.sc:nspp.sc
tsign-1:thermal_bias.sc
tsign1:thermal_bias.sc
temptrend_abs.sc:npp.sc
temptrend_abs.sc:veg.sc
[ reached getOption("max.print") -- omitted 7 rows ]
Standardized Within-Group Residuals:
Min Q1 Med Q3 Max
-8.38434700 -0.32179127 -0.03059932 0.31554016 8.33570233
Number of Observations: 36017
Number of Groups:
STUDY_ID rarefyID %in% STUDY_ID
231 36017
summary(modTfullHornrem0)
Linear mixed-effects model fit by REML
Data: trends[i3, ]
Random effects:
Formula: ~temptrend_abs.sc | STUDY_ID
Structure: General positive-definite, Log-Cholesky parametrization
StdDev Corr
(Intercept) 0.01556817 (Intr)
temptrend_abs.sc 0.02706589 -0.065
Formula: ~1 | rarefyID %in% STUDY_ID
(Intercept) Residual
StdDev: 0.01880474 2.445174
Variance function:
Structure: Power of variance covariate
Formula: ~nyrBT
Parameter estimates:
power
-2.327824
Fixed effects: Horntrendrem0 ~ temptrend_abs.sc * REALM + temptrend_abs.sc * tsign + temptrend_abs.sc * tempave_metab.sc + temptrend_abs.sc * seas.sc + temptrend_abs.sc * microclim.sc + temptrend_abs.sc * mass.sc + temptrend_abs.sc * speed.sc + temptrend_abs.sc * consumerfrac.sc + temptrend_abs.sc * nspp.sc + temptrend_abs.sc * thermal_bias.sc:tsign + temptrend_abs.sc * npp.sc + temptrend_abs.sc * veg.sc + temptrend_abs.sc * duration.sc + temptrend_abs.sc * human_bowler.sc:REALM2
Correlation:
(Intr) tmpt_. REALMM REALMT tsign1 tmpv_. ses.sc mcrcl. mss.sc
temptrend_abs.sc -0.501
REALMMarine -0.954 0.479
REALMTerrestrial -0.737 0.361 0.685
tsign1 -0.065 0.046 -0.001 0.011
tempave_metab.sc 0.101 -0.030 -0.080 -0.245 0.030
seas.sc -0.109 0.050 0.157 -0.095 -0.088 0.103
microclim.sc -0.067 0.042 0.076 0.017 0.014 -0.185 0.101
mass.sc 0.067 -0.007 -0.044 -0.030 -0.007 0.089 0.096 0.007
speed.sc 0.085 -0.062 -0.039 -0.090 -0.069 -0.078 -0.011 0.059 -0.421
consumerfrac.sc -0.017 0.024 0.010 0.088 0.033 -0.120 -0.052 0.016 -0.014
nspp.sc 0.008 -0.037 -0.051 -0.053 0.052 -0.146 0.006 -0.090 -0.060
npp.sc 0.026 0.001 -0.038 0.058 0.012 0.024 -0.189 -0.215 -0.036
veg.sc -0.518 0.276 0.536 0.028 -0.012 0.007 0.086 0.005 0.013
duration.sc -0.021 0.012 0.029 0.021 -0.149 0.077 -0.030 -0.022 -0.027
temptrend_abs.sc:REALMMarine 0.485 -0.949 -0.497 -0.337 -0.014 0.029 -0.069 -0.049 -0.004
temptrend_abs.sc:REALMTerrestrial 0.322 -0.727 -0.296 -0.510 -0.003 0.161 0.123 0.019 -0.017
temptrend_abs.sc:tsign1 0.041 -0.112 -0.010 0.003 -0.490 -0.038 0.007 -0.009 0.005
temptrend_abs.sc:tempave_metab.sc -0.008 0.041 -0.001 0.142 -0.063 -0.500 -0.094 0.047 -0.052
temptrend_abs.sc:seas.sc 0.059 -0.087 -0.081 0.111 0.052 -0.064 -0.641 -0.093 -0.060
temptrend_abs.sc:microclim.sc 0.029 -0.045 -0.034 0.002 -0.024 0.103 -0.051 -0.705 0.016
temptrend_abs.sc:mass.sc -0.010 0.023 0.005 -0.014 0.012 -0.062 -0.054 0.020 -0.580
temptrend_abs.sc:speed.sc -0.047 0.100 0.033 0.075 0.048 0.099 0.041 -0.036 0.222
temptrend_abs.sc:consumerfrac.sc 0.013 -0.035 -0.012 -0.064 -0.016 0.087 0.031 0.014 0.019
temptrend_abs.sc:nspp.sc -0.025 0.029 0.040 0.054 -0.019 0.077 0.011 0.047 0.009
tsign-1:thermal_bias.sc 0.060 -0.021 -0.056 -0.059 -0.088 0.204 -0.213 -0.040 -0.045
tsign1:thermal_bias.sc 0.103 -0.035 -0.105 -0.109 0.070 0.342 -0.321 -0.140 -0.016
temptrend_abs.sc:npp.sc 0.010 0.023 -0.006 -0.055 -0.005 -0.012 0.086 0.158 -0.004
temptrend_abs.sc:veg.sc 0.306 -0.426 -0.317 0.025 -0.011 -0.024 -0.102 0.009 -0.013
spd.sc cnsmr. nspp.s npp.sc veg.sc drtn.s t_.:REALMM t_.:REALMT
temptrend_abs.sc
REALMMarine
REALMTerrestrial
tsign1
tempave_metab.sc
seas.sc
microclim.sc
mass.sc
speed.sc
consumerfrac.sc -0.086
nspp.sc 0.179 0.094
npp.sc 0.120 -0.037 -0.198
veg.sc -0.005 -0.003 0.021 -0.163
duration.sc 0.011 0.008 -0.241 0.053 -0.006
temptrend_abs.sc:REALMMarine 0.035 -0.018 0.063 0.018 -0.292 -0.016
temptrend_abs.sc:REALMTerrestrial 0.082 -0.062 0.062 -0.057 0.030 -0.014 0.674
temptrend_abs.sc:tsign1 0.031 -0.012 -0.021 -0.035 -0.008 0.033 0.035 0.006
temptrend_abs.sc:tempave_metab.sc 0.118 0.079 0.088 -0.044 -0.013 -0.016 -0.027 -0.273
temptrend_abs.sc:seas.sc 0.013 0.019 0.025 0.125 -0.089 -0.016 0.123 -0.209
temptrend_abs.sc:microclim.sc -0.040 -0.007 0.051 0.172 0.014 0.011 0.057 -0.060
temptrend_abs.sc:mass.sc 0.245 0.026 0.011 -0.011 -0.009 0.047 0.012 0.032
temptrend_abs.sc:speed.sc -0.581 0.071 -0.127 -0.042 -0.015 -0.008 -0.043 -0.109
temptrend_abs.sc:consumerfrac.sc 0.074 -0.719 -0.063 0.013 -0.001 -0.021 0.023 0.094
temptrend_abs.sc:nspp.sc -0.134 -0.044 -0.615 0.100 -0.021 0.150 -0.081 -0.080
tsign-1:thermal_bias.sc 0.004 -0.007 -0.044 0.008 -0.005 0.073 0.027 0.027
tsign1:thermal_bias.sc -0.022 -0.017 -0.065 -0.057 -0.007 0.085 0.028 0.053
temptrend_abs.sc:npp.sc -0.058 0.005 0.098 -0.652 0.098 -0.036 -0.052 0.088
temptrend_abs.sc:veg.sc 0.000 0.003 -0.021 0.158 -0.620 0.002 0.456 -0.060
tm_.:1 tm_.:_. tmptrnd_bs.sc:ss. tmptrnd_bs.sc:mc.
temptrend_abs.sc
REALMMarine
REALMTerrestrial
tsign1
tempave_metab.sc
seas.sc
microclim.sc
mass.sc
speed.sc
consumerfrac.sc
nspp.sc
npp.sc
veg.sc
duration.sc
temptrend_abs.sc:REALMMarine
temptrend_abs.sc:REALMTerrestrial
temptrend_abs.sc:tsign1
temptrend_abs.sc:tempave_metab.sc 0.036
temptrend_abs.sc:seas.sc -0.027 0.073
temptrend_abs.sc:microclim.sc 0.005 0.021 0.115
temptrend_abs.sc:mass.sc -0.003 0.103 0.050 -0.051
temptrend_abs.sc:speed.sc -0.022 -0.285 0.012 0.040
temptrend_abs.sc:consumerfrac.sc 0.032 -0.099 -0.060 -0.037
temptrend_abs.sc:nspp.sc 0.012 -0.121 -0.028 -0.020
tsign-1:thermal_bias.sc -0.029 -0.061 0.132 0.022
tsign1:thermal_bias.sc 0.009 -0.115 0.148 0.048
temptrend_abs.sc:npp.sc 0.004 0.077 -0.208 -0.321
temptrend_abs.sc:veg.sc 0.054 0.006 0.173 0.006
tmptrnd_bs.sc:ms. tmptrnd_bs.sc:sp. tmptrnd_bs.sc:c.
temptrend_abs.sc
REALMMarine
REALMTerrestrial
tsign1
tempave_metab.sc
seas.sc
microclim.sc
mass.sc
speed.sc
consumerfrac.sc
nspp.sc
npp.sc
veg.sc
duration.sc
temptrend_abs.sc:REALMMarine
temptrend_abs.sc:REALMTerrestrial
temptrend_abs.sc:tsign1
temptrend_abs.sc:tempave_metab.sc
temptrend_abs.sc:seas.sc
temptrend_abs.sc:microclim.sc
temptrend_abs.sc:mass.sc
temptrend_abs.sc:speed.sc -0.394
temptrend_abs.sc:consumerfrac.sc -0.060 -0.116
temptrend_abs.sc:nspp.sc 0.007 0.159 0.088
tsign-1:thermal_bias.sc 0.020 0.003 0.002
tsign1:thermal_bias.sc 0.019 0.011 0.014
temptrend_abs.sc:npp.sc 0.052 0.013 0.000
temptrend_abs.sc:veg.sc 0.007 0.023 -0.006
tmptrnd_bs.sc:ns. t-1:_. ts1:_. tmptrnd_bs.sc:np.
temptrend_abs.sc
REALMMarine
REALMTerrestrial
tsign1
tempave_metab.sc
seas.sc
microclim.sc
mass.sc
speed.sc
consumerfrac.sc
nspp.sc
npp.sc
veg.sc
duration.sc
temptrend_abs.sc:REALMMarine
temptrend_abs.sc:REALMTerrestrial
temptrend_abs.sc:tsign1
temptrend_abs.sc:tempave_metab.sc
temptrend_abs.sc:seas.sc
temptrend_abs.sc:microclim.sc
temptrend_abs.sc:mass.sc
temptrend_abs.sc:speed.sc
temptrend_abs.sc:consumerfrac.sc
temptrend_abs.sc:nspp.sc
tsign-1:thermal_bias.sc 0.014
tsign1:thermal_bias.sc 0.022 0.393
temptrend_abs.sc:npp.sc -0.100 -0.016 0.045
temptrend_abs.sc:veg.sc 0.012 0.015 -0.016 -0.242
tmptrnd_bs.sc:v. tmptrnd_bs.sc:d. h_.:REALM2T h_.:REALM2M t_.:-1
temptrend_abs.sc
REALMMarine
REALMTerrestrial
tsign1
tempave_metab.sc
seas.sc
microclim.sc
mass.sc
speed.sc
consumerfrac.sc
nspp.sc
npp.sc
veg.sc
duration.sc
temptrend_abs.sc:REALMMarine
temptrend_abs.sc:REALMTerrestrial
temptrend_abs.sc:tsign1
temptrend_abs.sc:tempave_metab.sc
temptrend_abs.sc:seas.sc
temptrend_abs.sc:microclim.sc
temptrend_abs.sc:mass.sc
temptrend_abs.sc:speed.sc
temptrend_abs.sc:consumerfrac.sc
temptrend_abs.sc:nspp.sc
tsign-1:thermal_bias.sc
tsign1:thermal_bias.sc
temptrend_abs.sc:npp.sc
temptrend_abs.sc:veg.sc
t_.:1: t_.:_.:REALM2T
temptrend_abs.sc
REALMMarine
REALMTerrestrial
tsign1
tempave_metab.sc
seas.sc
microclim.sc
mass.sc
speed.sc
consumerfrac.sc
nspp.sc
npp.sc
veg.sc
duration.sc
temptrend_abs.sc:REALMMarine
temptrend_abs.sc:REALMTerrestrial
temptrend_abs.sc:tsign1
temptrend_abs.sc:tempave_metab.sc
temptrend_abs.sc:seas.sc
temptrend_abs.sc:microclim.sc
temptrend_abs.sc:mass.sc
temptrend_abs.sc:speed.sc
temptrend_abs.sc:consumerfrac.sc
temptrend_abs.sc:nspp.sc
tsign-1:thermal_bias.sc
tsign1:thermal_bias.sc
temptrend_abs.sc:npp.sc
temptrend_abs.sc:veg.sc
[ reached getOption("max.print") -- omitted 7 rows ]
Standardized Within-Group Residuals:
Min Q1 Med Q3 Max
-5.67542034 -0.23386259 -0.02454167 0.23164547 5.75602618
Number of Observations: 35327
Number of Groups:
STUDY_ID rarefyID %in% STUDY_ID
200 35327
rsquared(modTfullJturem0)
rsquared(modTfullJbetarem0)
rsquared(modTfullHornrem0)
NA
coefs1 <- summary(modTfullJturem0)$tTable
coefs2 <- summary(modTfullJbetarem0)$tTable
coefs3 <- summary(modTfullHornrem0)$tTable
varstoplot <- unique(c(rownames(coefs1), rownames(coefs2), rownames(coefs3)))
varstoplot <- varstoplot[which(!grepl('Intercept', varstoplot) | grepl(':', varstoplot))] # vars to plot
rows1_1 <- which(rownames(coefs1) %in% varstoplot) # rows in coefs
rows1_2 <- which(rownames(coefs2) %in% varstoplot)
rows1_3 <- which(rownames(coefs3) %in% varstoplot)
xlims <- range(c(coefs1[rows1_1,1] - coefs1[rows1_1,2], coefs1[rows1_1,1] + coefs1[rows1_1,2],
coefs2[rows1_2,1] - coefs2[rows1_2,2], coefs2[rows1_2,1] + coefs2[rows1_2,2],
coefs3[rows1_3,1] - coefs3[rows1_3,2], coefs3[rows1_3,1] + coefs3[rows1_3,2]))
cols <- brewer.pal(3, 'Dark2') # for Jtu, Jbeta and Horn models
pchs <- c(16, 16, 16)
offs <- c(0.1, 0, -0.1) # offset vertically for each model
par(las = 1, mai = c(0.5, 4, 0.1, 0.1))
plot(0,0, col = 'white', xlim = xlims, ylim = c(1,length(varstoplot)), yaxt='n', xlab = '', ylab ='')
axis(2, at = length(varstoplot):1, labels = varstoplot, cex.axis = 0.7)
abline(v = 0, col = 'grey', lty = 2)
abline(h = 1:length(varstoplot), col = 'grey', lty = 3)
for(i in 1:length(varstoplot)){
if(varstoplot[i] %in% rownames(coefs1)){
x = coefs1[rownames(coefs1) == varstoplot[i], 1]
se = coefs1[rownames(coefs1) == varstoplot[i], 2]
points(x, length(varstoplot) + 1 - i + offs[1], pch = pchs[1], col = cols[1])
lines(x = c(x-se, x+se), y = c(length(varstoplot) + 1 - i + offs[1], length(varstoplot) + 1 - i + offs[1]), col = cols[1])
}
if(varstoplot[i] %in% rownames(coefs2)){
x = coefs2[rownames(coefs2) == varstoplot[i], 1]
se = coefs2[rownames(coefs2) == varstoplot[i], 2]
points(x, length(varstoplot) + 1 - i + offs[2], pch = pchs[2], col = cols[2])
lines(x = c(x-se, x+se), y = c(length(varstoplot) + 1 - i + offs[2], length(varstoplot) + 1 - i + offs[2]), col = cols[2])
}
if(varstoplot[i] %in% rownames(coefs3)){
x = coefs3[rownames(coefs3) == varstoplot[i], 1]
se = coefs3[rownames(coefs3) == varstoplot[i], 2]
points(x, length(varstoplot) + 1 - i + offs[3], pch = pchs[3], col = cols[3])
lines(x = c(x-se, x+se), y = c(length(varstoplot) + 1 - i + offs[3], length(varstoplot) + 1 - i + offs[3]), col = cols[3])
}
}
legend('topleft', col = cols, pch = 16, lwd = 1, legend = c('Jtu', 'Jbeta', 'Horn'), cex = 0.5)
# set up the variables to plot
# if variable is logged before scaling (see 'center and scale' above), then need to mark it here and express the limits on a log10 scale (even though log transforming is log)
vars <- data.frame(vars = c('temptrend_abs', 'tempave_metab', 'seas', 'microclim', 'mass', 'speed',
'consumerfrac', 'nspp', 'thermal_bias', 'npp', 'veg', 'duration',
'human_bowler', 'human_bowler'),
min = c(0, 0, 0.1, -2, 0, 0, 0, 0.3, -10, 1.9, 0, 0.5, 0, 0),
max = c(2, 30, 16, 0.8, 8, 2, 1, 2.6, 10, 3.7, 0.3, 2, 1, 1),
log = c(F, F, F, T, T, T, F, T, F, T, T, T, T, T),
len = c(100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100),
discrete = c(F, F, F, F, F, F, F, F, F, F, F, F, F, F),
plus = c(0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1), # what to add before log-scaling
REALM = c(rep('Terrestrial', 13), 'Marine'),
REALM2 = c(rep('TerrFresh', 13), 'Marine'),
stringsAsFactors = FALSE)
baseall <- trends[, .(type = 'all',
temptrend = -0.0001,
temptrend_abs.sc = 0.0001,
tempave_metab.sc = mean(tempave_metab.sc, na.rm=TRUE),
seas.sc = mean(seas.sc, na.rm=TRUE),
microclim.sc = mean(microclim.sc, na.rm=TRUE),
speed.sc = mean(speed.sc, na.rm=TRUE),
mass.sc = mean(mass.sc, na.rm=TRUE),
nspp.sc = 0,
thermal_bias.sc = mean(thermal_bias.sc, na.rm=TRUE),
npp.sc = mean(npp.sc, na.rm=TRUE),
human_bowler.sc = mean(human_bowler.sc, na.rm=TRUE),
veg.sc = mean(veg.sc, na.rm=TRUE),
consumerfrac.sc = mean(consumerfrac.sc, na.rm=TRUE))]
baseterr <- trends[REALM == 'Terrestrial',
.(type = 'Terrestrial',
temptrend = -0.0001,
temptrend_abs.sc = 0.0001,
tempave_metab.sc = mean(tempave_metab.sc, na.rm=TRUE),
seas.sc = mean(seas.sc, na.rm=TRUE),
microclim.sc = mean(microclim.sc, na.rm=TRUE),
speed.sc = mean(speed.sc, na.rm=TRUE),
mass.sc = mean(mass.sc, na.rm=TRUE),
nspp.sc = 0,
thermal_bias.sc = 0,
npp.sc = mean(npp.sc, na.rm=TRUE),
human_bowler.sc = mean(human_bowler.sc, na.rm=TRUE),
veg.sc = mean(veg.sc, na.rm=TRUE),
consumerfrac.sc = mean(consumerfrac.sc, na.rm=TRUE))]
basemar <- trends[REALM == 'Marine',
.(type = 'Marine',
temptrend = -0.0001,
temptrend_abs.sc = 0.0001,
tempave_metab.sc = mean(tempave_metab.sc, na.rm=TRUE),
seas.sc = mean(seas.sc, na.rm=TRUE),
microclim.sc = mean(microclim.sc, na.rm=TRUE),
speed.sc = mean(speed.sc, na.rm=TRUE),
mass.sc = mean(mass.sc, na.rm=TRUE),
nspp.sc = 0,
thermal_bias.sc = 0,
npp.sc = mean(npp.sc, na.rm=TRUE),
human_bowler.sc = mean(human_bowler.sc, na.rm=TRUE),
veg.sc = mean(veg.sc, na.rm=TRUE),
consumerfrac.sc = mean(consumerfrac.sc, na.rm=TRUE))]
basetab <- rbind(baseall, baseterr, basemar)
basetab[, ':='(duration.sc = 0, nyrBT = 20, STUDY_ID = 127L, rarefyID = '127_514668')]
# make the data frames for each interaction to plot
for(j in 1:nrow(vars)){
# set up the main effects
if(vars$log[j]){
thisdat <- data.frame(new = 10^seq(vars$min[j], vars$max[j], length.out = vars$len[j]),
var = vars$vars[j], stringsAsFactors = FALSE)
}
if(!vars$log[j]){
thisdat <- data.frame(new = seq(vars$min[j], vars$max[j], length.out = vars$len[j]),
var = vars$vars[j], stringsAsFactors = FALSE)
}
names(thisdat) <- c(vars$vars[j], 'var')
# scale the variable
cent <- attr(trends[[paste0(vars$vars[j], '.sc')]], 'scaled:center')
scl <- attr(trends[[paste0(vars$vars[j], '.sc')]], 'scaled:scale')
if(is.null(cent)) cent <- 0
if(!is.null(cent) & !is.null(scl)){
if(vars$log[j]) thisdat[[paste0(vars$var[j], '.sc')]] <- (log(thisdat[[vars$vars[j]]] + vars$plus[j]) - cent)/scl
if(!vars$log[j]) thisdat[[paste0(vars$var[j], '.sc')]] <- (thisdat[[vars$var[j]]] - cent)/scl
}
# merge with the rest of the columns
# use realm-specific averages for human impacts
if(vars$vars[j] != 'tsign') colnamestouse <- setdiff(colnames(basetab), paste0(vars$vars[j], '.sc'))
if(vars$vars[j] == 'tsign') colnamestouse <- setdiff(colnames(basetab), vars$var[j])
if(vars$vars[j] != 'human_bowler'){
thisdat <- cbind(thisdat, basetab[type == 'all', ..colnamestouse])
}
if(vars$vars[j] == 'human_bowler' & vars$REALM[j] == 'Terrestrial'){
thisdat <- cbind(thisdat, basetab[type == 'Terrestrial', ..colnamestouse])
}
if(vars$vars[j] == 'human_bowler' & vars$REALM[j] == 'Marine'){
thisdat <- cbind(thisdat, basetab[type == 'Marine', ..colnamestouse])
}
# add realm
thisdat$REALM <- vars$REALM[j]
thisdat$REALM2 <- vars$REALM2[j]
# merge with the previous iterations
if(j == 1) newdat <- thisdat
if(j > 1){
colstoadd <- setdiff(colnames(thisdat), colnames(newdat))
for(toadd in colstoadd){
newdat[[toadd]] <- NA
}
colstoadd2 <- setdiff(colnames(newdat), colnames(thisdat))
for(toadd in colstoadd2){
thisdat[[toadd]] <- NA
}
newdat <- rbind(newdat, thisdat)
}
}
# character so that new levels can be added
newdat$REALM <- as.character(newdat$REALM)
newdat$REALM2 <- as.character(newdat$REALM2)
# add extra rows so that all factor levels are represented (for predict.lme to work)
newdat <- rbind(newdat[1:6, ], newdat)
newdat$REALM[1:6] <- c('Marine', 'Marine', 'Freshwater', 'Freshwater', 'Terrestrial', 'Terrestrial')
newdat$REALM2[1:6] <- c('Marine', 'Marine', 'TerrFresh', 'TerrFresh', 'TerrFresh', 'TerrFresh')
newdat$temptrend_abs.sc[1:6] <- rep(0.0001, 6)
newdat$temptrend[1:6] <- rep(c(0.0001, -0.0001), 3)
newdat$var[1:6] <- 'test'
# trim to at least some temperature change (so that tsign is -1 or 1)
newdat <- newdat[newdat$temptrend_abs.sc != 0,]
# set up tsign
newdat$tsign <- factor(sign(newdat$temptrend))
# make predictions
newdat$predsJtu <- predict(object = modTfullJturem0, newdata = newdat, level = 0)
newdat$predsJbeta <- predict(object = modTfullJbetarem0, newdata = newdat, level = 0)
newdat$predsHorn <- predict(object = modTfullHornrem0, newdata = newdat, level = 0)
#compute standard error for predictions
# from https://stackoverflow.com/questions/14358811/extract-prediction-band-from-lme-fit
DesignmatJtu <- model.matrix(eval(eval(modTfullJturem0$call$fixed)[-2]), newdat)
DesignmatJbeta <- model.matrix(eval(eval(modTfullJbetarem0$call$fixed)[-2]), newdat)
DesignmatHorn <- model.matrix(eval(eval(modTfullHornrem0$call$fixed)[-2]), newdat)
predvarJtu <- diag(DesignmatJtu %*% modTfullJturem0$varFix %*% t(DesignmatJtu))
predvarJbeta <- diag(DesignmatJbeta %*% modTfullJbetarem0$varFix %*% t(DesignmatJbeta))
predvarHorn <- diag(DesignmatHorn %*% modTfullHornrem0$varFix %*% t(DesignmatHorn))
newdat$SE_Jtu <- sqrt(predvarJtu)
newdat$SE_Jbeta <- sqrt(predvarJbeta)
newdat$SE_Horn <- sqrt(predvarHorn)
# prep the plots
varplots <- vector('list', nrow(vars))
for(j in 1:length(varplots)){
subs <- newdat$var == vars$vars[j] # which rows of newdat
xvar <- vars$vars[j]
title <- vars$vars[j]
if(vars$vars[j] %in% c('human_bowler')){
subs <- newdat$var == vars$vars[j] & newdat$REALM2 == vars$REALM2[j]
title <- paste0('human:', vars$REALM2[j])
}
se <- 1
thisplot <- ggplot(newdat[subs, ],
aes_string(x = xvar, y = 'predsJtu')) +
geom_line() +
geom_ribbon(aes(ymin = predsJtu - se*SE_Jtu, ymax = predsJtu + se*SE_Jtu), alpha = 0.5, fill = "grey") +
geom_line(aes(y = predsJbeta), color = 'red') +
geom_ribbon(aes(ymin = predsJbeta - se*SE_Jbeta, ymax = predsJbeta + se*SE_Jbeta), alpha = 0.5, fill = "red") +
geom_line(aes(y = predsHorn), color = 'blue') +
geom_ribbon(aes(ymin = predsHorn - se*SE_Horn, ymax = predsHorn + se*SE_Horn), alpha = 0.5, fill = "blue") +
#coord_cartesian(ylim = c(0, 0.4)) +
theme(plot.margin = unit(c(0.5,0,0.5,0), 'cm')) +
labs(title = title)
varplots[[j]] <- thisplot
if(vars$log[j] & !vars$discrete[j]){
varplots[[j]] <- thisplot + scale_x_log10()
}
}
grid.arrange(grobs = varplots, ncol = 3)
# write out the interactions
write.csv(newdat, file = 'output/maineffects.csv')
Doesn’t work now
require(sjPlot)
# p1 <- sjPlot::plot_model(modTfullJturem0, type = 'est', terms = c('temptrend_abs.sc'))
# set up the interactions to plot
# if variable is logged before scaling (see 'center and scale' above), then need to mark it here and express the limits on a log10 scale (even though log transforming is log)
ints <- data.frame(vars = c('tsign', 'tempave_metab', 'seas', 'microclim', 'mass', 'speed',
'consumerfrac', 'nspp', 'thermal_bias', 'npp', 'veg', 'duration',
'human_bowler', 'human_bowler'),
min = c(1, 0, 0.1, -2, 0, 0, 0, 0.3, -10, 1.9, 0, 0.5, 0, 0),
max = c(2, 30, 16, 0.8, 8, 2, 1, 2.6, 10, 3.7, 0.3, 2, 1, 1),
log = c(F, F, F, T, T, T, F, T, F, T, T, T, T, T),
len = c(2, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100),
discrete = c(T, F, F, F, F, F, F, F, F, F, F, F, F, F),
plus = c(0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1), # what to add before log-scaling
REALM = c(rep('Terrestrial', 12), 'Terrestrial', 'Marine'),
REALM2 = c(rep('TerrFresh', 13), 'Marine'),
stringsAsFactors = FALSE)
baseall <- trends[, .(type = 'all', tempave_metab.sc = mean(tempave_metab.sc, na.rm=TRUE),
seas.sc = mean(seas.sc, na.rm=TRUE),
microclim.sc = mean(microclim.sc, na.rm=TRUE),
speed.sc = mean(speed.sc, na.rm=TRUE),
mass.sc = mean(mass.sc, na.rm=TRUE),
nspp.sc = 0,
thermal_bias.sc = mean(thermal_bias.sc, na.rm=TRUE),
npp.sc = mean(npp.sc, na.rm=TRUE),
human_bowler.sc = mean(human_bowler.sc, na.rm=TRUE),
veg.sc = mean(veg.sc, na.rm=TRUE),
consumerfrac.sc = mean(consumerfrac.sc, na.rm=TRUE))]
baseterr <- trends[REALM == 'Terrestrial',
.(type = 'Terrestrial',
tempave_metab.sc = mean(tempave_metab.sc, na.rm=TRUE),
seas.sc = mean(seas.sc, na.rm=TRUE),
microclim.sc = mean(microclim.sc, na.rm=TRUE),
speed.sc = mean(speed.sc, na.rm=TRUE),
mass.sc = mean(mass.sc, na.rm=TRUE),
nspp.sc = 0,
thermal_bias.sc = 0,
npp.sc = mean(npp.sc, na.rm=TRUE),
human_bowler.sc = mean(human_bowler.sc, na.rm=TRUE),
veg.sc = mean(veg.sc, na.rm=TRUE),
consumerfrac.sc = mean(consumerfrac.sc, na.rm=TRUE))]
basemar <- trends[REALM == 'Marine',
.(type = 'Marine',
tempave_metab.sc = mean(tempave_metab.sc, na.rm=TRUE),
seas.sc = mean(seas.sc, na.rm=TRUE),
microclim.sc = mean(microclim.sc, na.rm=TRUE),
speed.sc = mean(speed.sc, na.rm=TRUE),
mass.sc = mean(mass.sc, na.rm=TRUE),
nspp.sc = 0,
thermal_bias.sc = 0,
npp.sc = mean(npp.sc, na.rm=TRUE),
human_bowler.sc = mean(human_bowler.sc, na.rm=TRUE),
veg.sc = mean(veg.sc, na.rm=TRUE),
consumerfrac.sc = mean(consumerfrac.sc, na.rm=TRUE))]
basetab <- rbind(baseall, baseterr, basemar)
basetab[, ':='(duration.sc = 0, nyrBT = 20, STUDY_ID = 127L, rarefyID = '127_514668')]
# make the data frames for each interaction to plot
for(j in 1:nrow(ints)){
# set up a grid of temperature trends and the interacting variable
if(ints$log[j]) intvars <- list(temptrend = seq(-1.5, 1.5, length.out = 100),
new = 10^seq(ints$min[j], ints$max[j], length.out = ints$len[j]),
var = ints$vars[j])
if(!ints$log[j]) intvars <- list(temptrend = seq(-1.5, 1.5, length.out = 100),
new = seq(ints$min[j], ints$max[j], length.out = ints$len[j]),
var = ints$vars[j])
names(intvars) <- c('temptrend', ints$vars[j], 'var')
thisdat <- expand.grid(intvars)
# scale the interacting variable
cent <- attr(trends[[paste0(ints$var[j], '.sc')]], 'scaled:center')
scl <- attr(trends[[paste0(ints$var[j], '.sc')]], 'scaled:scale')
if(!is.null(cent) & !is.null(scl)){
if(ints$log[j]) thisdat[[paste0(ints$var[j], '.sc')]] <- (log(thisdat[[ints$vars[j]]] + ints$plus[j]) - cent)/scl
if(!ints$log[j]) thisdat[[paste0(ints$var[j], '.sc')]] <- (thisdat[[ints$var[j]]] - cent)/scl
}
# merge with the rest of the columns
# use realm-specific averages for human impacts
if(ints$vars[j] != 'tsign') colnamestouse <- setdiff(colnames(basetab), paste0(ints$var[j], '.sc'))
if(ints$vars[j] == 'tsign') colnamestouse <- setdiff(colnames(basetab), ints$var[j])
if(ints$vars[j] != 'human_bowler'){
thisdat <- cbind(thisdat, basetab[type == 'all', ..colnamestouse])
}
if(ints$vars[j] == 'human_bowler' & ints$REALM[j] == 'Terrestrial'){
thisdat <- cbind(thisdat, basetab[type == 'Terrestrial', ..colnamestouse])
}
if(ints$vars[j] == 'human_bowler' & ints$REALM[j] == 'Marine'){
thisdat <- cbind(thisdat, basetab[type == 'Marine', ..colnamestouse])
}
# add realm
thisdat$REALM <- ints$REALM[j]
thisdat$REALM2 <- ints$REALM2[j]
# merge with the previous iterations
if(j == 1) newdat <- thisdat
if(j > 1){
colstoadd <- setdiff(colnames(thisdat), colnames(newdat))
for(toadd in colstoadd){
newdat[[toadd]] <- NA
}
colstoadd2 <- setdiff(colnames(newdat), colnames(thisdat))
for(toadd in colstoadd2){
thisdat[[toadd]] <- NA
}
newdat <- rbind(newdat, thisdat)
}
}
# character so that new levels can be added
newdat$REALM <- as.character(newdat$REALM)
newdat$REALM2 <- as.character(newdat$REALM2)
# add extra rows so that all factor levels are represented (for predict.lme to work)
newdat <- rbind(newdat[1:6, ], newdat)
newdat$REALM[1:6] <- c('Marine', 'Marine', 'Freshwater', 'Freshwater', 'Terrestrial', 'Terrestrial')
newdat$REALM2[1:6] <- c('Marine', 'Marine', 'TerrFresh', 'TerrFresh', 'TerrFresh', 'TerrFresh')
newdat$temptrend[1:6] <- c(-1, 1, -1, 1, -1, 1)
# trim to at least some temperature change (so that tsign is -1 or 1)
newdat <- newdat[newdat$temptrend != 0,]
# scale the temperature vars
newdat$temptrend.sc <- newdat$temptrend/attr(trends$temptrend.sc, 'scaled:scale')
newdat$temptrend_abs <- abs(newdat$temptrend)
newdat$temptrend_abs.sc <- (newdat$temptrend_abs)/attr(trends$temptrend_abs.sc, 'scaled:scale')
newdat$tsign <- factor(sign(newdat$temptrend))
# make predictions
newdat$preds <- predict(object = modTfullJturem0, newdata = newdat, level = 0)
#remove the extra rows
newdat <- newdat[5:nrow(newdat), ]
# prep the plots
intplots <- vector('list', nrow(ints))
for(j in 1:length(intplots)){
subs <- newdat$var == ints$vars[j] & newdat$temptrend > 0 # select warming side
xvar <- 'temptrend_abs'
title <- ints$vars[j]
if(ints$vars[j] %in% c('tsign')){
subs <- newdat$var == ints$vars[j]
}
if(ints$vars[j] %in% c('thermal_bias')){
subs <- newdat$var == ints$vars[j]
xvar <- 'temptrend'
}
if(ints$vars[j] %in% c('human_bowler')){
subs <- newdat$var == ints$vars[j] & newdat$temptrend > 0 & newdat$REALM2 == ints$REALM2[j]
title <- paste0('human:', ints$REALM2[j])
}
thisplot <- ggplot(newdat[subs, ],
aes_string(x = xvar, y = 'preds',
group = ints$vars[j],
color = ints$vars[j])) +
geom_line() +
coord_cartesian(ylim = c(-0.2, 0.4)) +
theme(plot.margin = unit(c(0.5,0,0.5,0), 'cm')) +
labs(title = title)
if(ints$log[j] & !ints$discrete[j]){
intplots[[j]] <- thisplot + scale_color_distiller(palette = "YlGnBu", trans = 'log')
}
if(!ints$log[j] & !ints$discrete[j]){
intplots[[j]] <- thisplot + scale_color_distiller(palette = "YlGnBu", trans = 'identity')
}
if(ints$discrete[j]){
intplots[[j]] <- thisplot + scale_color_brewer(palette = "Dark2")
}
}
#grid.arrange(grobs = intplots, '+', theme(plot.margin = unit(c(0,0,0,0), 'cm'))), ncol=2)
#do.call('grid.arrange', c(intplots, ncol = 2))
grid.arrange(grobs = intplots, ncol = 3)
# write out the interactions
write.csv(newdat, file = 'temp/interactions.csv')
resids <- resid(modTfullJturem0)
preds <- getData(modTfullJturem0)
col = '#00000033'
cex = 0.5
par(mfrow = c(5,4))
boxplot(resids ~ preds$REALM, cex = cex, col = col)
plot(preds$temptrend_abs.sc, resids, cex = cex, col = col)
plot(preds$tsign, resids, cex = cex, col = col)
plot(preds$tempave.sc, resids, cex = cex, col = col)
plot(preds$tempave_metab.sc, resids, cex = cex, col = col)
plot(preds$seas.sc, resids, cex = cex, col = col)
plot(preds$microclim.sc, resids, cex = cex, col = col)
plot(preds$mass.sc, resids, cex = cex, col = col)
plot(preds$speed.sc, resids, cex = cex, col = col)
plot(preds$lifespan.sc, resids, cex = cex, col = col)
plot(preds$consumerfrac.sc, resids, cex = cex, col = col)
plot(preds$endothermfrac.sc, resids, cex = cex, col = col)
plot(preds$nspp.sc, resids, cex = cex, col = col)
plot(preds$thermal_bias.sc, resids, cex = cex, col = col)
plot(preds$npp.sc, resids, cex = cex, col = col)
plot(preds$veg.sc, resids, cex = cex, col = col)
plot(preds$human_bowler.sc, resids, cex = cex, col = col)
# transform for a plot
aicsfromfulllong <- reshape(aicsfromfull, direction = 'long',
varying = c('dAIC_Jtu', 'dAIC_Jbeta', 'dAIC_Horn'),
v.names = 'dAIC',
idvar = 'mod',
timevar = 'type',
times = c('Jtu', 'Jbeta', 'Horn'))
trans = function(x) sign(x)*sqrt(abs(x))
aicsfromfulllong$dAIC_tr <- trans(aicsfromfulllong$dAIC)
# plot
xlims <- range(aicsfromfulllong$dAIC_tr, na.rm = TRUE)
xticks <- c(-10, 0, 10, 100, 1000, 10000)
par(mai = c(0.5, 3, 0.1, 0.1))
with(aicsfromfulllong[aicsfromfulllong$type == 'Jtu',], plot(dAIC_tr, nrow(aicsfromfull):1,
col = 'light grey', xlim = xlims, yaxt = 'n', ylab = '', xaxt = 'n'))
with(aicsfromfulllong[aicsfromfulllong$type == 'Jbeta',], points(dAIC_tr, nrow(aicsfromfull):1 - 0.1, col = 'dark grey'))
with(aicsfromfulllong[aicsfromfulllong$type == 'Horn',], points(dAIC_tr, nrow(aicsfromfull):1 - 0.2, col = 'black'))
axis(2, at = nrow(aicsfromfull):1, labels = aicsfromfull$mod, las = 1, cex.axis = 0.7)
axis(1, at = trans(xticks), labels = xticks, cex.axis = 0.5)
abline(v = 0, lty =2, col = 'grey')
Light grey is for Jaccard turnover, dark grey is for Jaccard total, black is for Morisita-Horn. Clear that removing temperature trend makes the model quite a bit worse and has the biggest effect.
This takes a couple days on a laptop to run if temp/ files not available.
i1 <- trends[, complete.cases(Jtutrendrem0, REALM, tempave_metab.sc, seas.sc, microclim.sc,
temptrend_abs.sc, mass.sc, speed.sc,
consumerfrac.sc, nspp.sc, thermal_bias.sc, npp.sc,
veg.sc, duration.sc, human_bowler.sc)]
i2 <- trends[, complete.cases(Jbetatrendrem0, REALM, tempave_metab.sc, seas.sc, microclim.sc,
temptrend_abs.sc, mass.sc, speed.sc,
consumerfrac.sc, nspp.sc, thermal_bias.sc, npp.sc,
veg.sc, duration.sc, human_bowler.sc)]
i3 <- trends[, complete.cases(Horntrendrem0, REALM, tempave_metab.sc, seas.sc, microclim.sc,
temptrend_abs.sc, mass.sc, speed.sc,
consumerfrac.sc, nspp.sc, thermal_bias.sc, npp.sc,
veg.sc, duration.sc, human_bowler.sc)]
randef <- list(STUDY_ID = ~ temptrend_abs.sc, rarefyID = ~1)
varef <- varPower(-0.5, ~nyrBT)
# simplify the full models
if(file.exists('temp/modTsimpJturem0.rds')){
modTsimpJturem0 <- readRDS('temp/modTsimpJturem0.rds')
} else {
modTfullJturem0ML <- lme(Jtutrendrem0 ~ temptrend_abs.sc*REALM +
temptrend_abs.sc*tsign +
temptrend_abs.sc*tempave_metab.sc +
temptrend_abs.sc*seas.sc +
temptrend_abs.sc*microclim.sc +
temptrend_abs.sc*mass.sc +
temptrend_abs.sc*speed.sc +
temptrend_abs.sc*consumerfrac.sc +
temptrend_abs.sc*nspp.sc +
temptrend_abs.sc*thermal_bias.sc:tsign +
temptrend_abs.sc*npp.sc +
temptrend_abs.sc*veg.sc +
temptrend_abs.sc*duration.sc +
temptrend_abs.sc*human_bowler.sc:REALM2,
random = randef, weights = varef, data = trends[i1,], method = 'ML',
control = lmeControl(maxIter = 100, msMaxIter = 100, niterEM = 50, msMaxEval = 500))
modTsimpJturem0 <- stepAIC(modTfullJturem0ML, direction = 'backward')
saveRDS(modTsimpJturem0, file = 'temp/modTsimpJturem0.rds')
}
if(file.exists('temp/modTsimpJbetarem0.rds')){
modTsimpJbetarem0 <- readRDS('temp/modTsimpJbetarem0.rds')
} else {
modTfullJbetarem0ML <- lme(Jbetatrendrem0 ~ temptrend_abs.sc*REALM +
temptrend_abs.sc*tsign +
temptrend_abs.sc*tempave_metab.sc +
temptrend_abs.sc*seas.sc +
temptrend_abs.sc*microclim.sc +
temptrend_abs.sc*mass.sc +
temptrend_abs.sc*speed.sc +
temptrend_abs.sc*consumerfrac.sc +
temptrend_abs.sc*nspp.sc +
temptrend_abs.sc*thermal_bias.sc:tsign +
temptrend_abs.sc*npp.sc +
temptrend_abs.sc*veg.sc +
temptrend_abs.sc*duration.sc +
temptrend_abs.sc*human_bowler.sc:REALM2,
random = randef, weights = varef, data = trends[i2,], method = 'ML')
modTsimpJbetarem0 <- stepAIC(modTfullJbetarem0ML, direction = 'backward')
saveRDS(modTsimpJbetarem0, file = 'temp/modTsimpJbetarem0.rds')
}
if(file.exists('temp/modTsimpHornrem0.rds')){
modTsimpHornrem0 <- readRDS('temp/modTsimpHornrem0.rds')
} else {
modTfullHornrem0ML <- lme(Horntrendrem0 ~ temptrend_abs.sc*REALM +
temptrend_abs.sc*tsign +
temptrend_abs.sc*tempave_metab.sc +
temptrend_abs.sc*seas.sc +
temptrend_abs.sc*microclim.sc +
temptrend_abs.sc*mass.sc +
temptrend_abs.sc*speed.sc +
temptrend_abs.sc*consumerfrac.sc +
temptrend_abs.sc*nspp.sc +
temptrend_abs.sc*thermal_bias.sc:tsign +
temptrend_abs.sc*npp.sc +
temptrend_abs.sc*veg.sc +
temptrend_abs.sc*duration.sc +
temptrend_abs.sc*human_bowler.sc:REALM2,
random = randef, weights = varef, data = trends[i3,], method = 'ML')
modTsimpHornrem0 <- stepAIC(modTfullHornrem0ML, direction = 'backward')
saveRDS(modTsimpHornrem0, file = 'temp/modTsimpHornrem0.rds')
}
summary(modTsimpJturem0)
Linear mixed-effects model fit by maximum likelihood
Data: trends[i1, ]
Random effects:
Formula: ~temptrend_abs.sc | STUDY_ID
Structure: General positive-definite, Log-Cholesky parametrization
StdDev Corr
(Intercept) 0.009359204 (Intr)
temptrend_abs.sc 0.024191157 -0.98
Formula: ~1 | rarefyID %in% STUDY_ID
(Intercept) Residual
StdDev: 0.01090463 2.006731
Variance function:
Structure: Power of variance covariate
Formula: ~nyrBT
Parameter estimates:
power
-2.129313
Fixed effects: Jtutrendrem0 ~ temptrend_abs.sc + tsign + tempave_metab.sc + seas.sc + microclim.sc + mass.sc + speed.sc + consumerfrac.sc + npp.sc + veg.sc + duration.sc + temptrend_abs.sc:tsign + temptrend_abs.sc:tempave_metab.sc + temptrend_abs.sc:microclim.sc + temptrend_abs.sc:consumerfrac.sc + tsign:thermal_bias.sc + temptrend_abs.sc:npp.sc + human_bowler.sc:REALM2 + temptrend_abs.sc:tsign:thermal_bias.sc + temptrend_abs.sc:human_bowler.sc:REALM2
Correlation:
(Intr) tmpt_. tsign1 tmpv_. ses.sc mcrcl. mss.sc spd.sc cnsmr.
temptrend_abs.sc -0.860
tsign1 -0.318 0.167
tempave_metab.sc -0.095 0.079 0.081
seas.sc 0.099 -0.049 -0.051 0.071
microclim.sc -0.054 0.062 0.028 -0.203 0.032
mass.sc -0.012 0.059 -0.021 0.072 0.147 0.013
speed.sc 0.096 -0.056 -0.036 -0.113 -0.045 0.075 -0.560
consumerfrac.sc 0.085 -0.084 0.000 -0.096 -0.041 0.047 0.040 -0.123
npp.sc -0.134 0.131 0.059 0.050 -0.053 -0.222 -0.045 0.130 -0.023
veg.sc -0.134 0.076 -0.031 -0.074 -0.424 -0.074 0.120 -0.043 0.052
duration.sc -0.174 0.145 -0.163 0.103 -0.095 -0.049 -0.010 -0.025 0.019
temptrend_abs.sc:tsign1 0.157 -0.361 -0.516 -0.057 -0.024 -0.009 -0.009 0.017 -0.001
temptrend_abs.sc:tempave_metab.sc 0.074 -0.076 -0.047 -0.820 -0.072 0.148 0.070 -0.182 0.112
temptrend_abs.sc:microclim.sc 0.057 -0.056 -0.024 0.131 -0.003 -0.763 0.006 -0.048 -0.023
temptrend_abs.sc:consumerfrac.sc -0.089 0.092 0.011 0.072 -0.006 -0.023 -0.073 0.061 -0.783
tsign-1:thermal_bias.sc 0.010 0.041 -0.089 0.133 -0.155 -0.005 -0.025 0.006 0.006
tsign1:thermal_bias.sc -0.052 0.030 0.055 0.228 -0.272 -0.089 -0.041 0.006 -0.013
temptrend_abs.sc:npp.sc 0.125 -0.173 -0.037 -0.017 -0.008 0.191 0.032 -0.048 -0.014
human_bowler.sc:REALM2TerrFresh -0.029 0.031 0.021 -0.007 -0.092 0.090 0.046 -0.042 -0.031
human_bowler.sc:REALM2Marine 0.009 -0.004 -0.014 0.092 -0.124 0.030 -0.016 0.032 -0.069
temptrend_abs.sc:tsign-1:thermal_bias.sc 0.058 -0.129 -0.059 -0.154 0.016 0.043 0.025 -0.044 0.009
temptrend_abs.sc:tsign1:thermal_bias.sc 0.010 -0.006 0.017 -0.234 0.003 0.065 0.034 -0.116 0.010
temptrend_abs.sc:human_bowler.sc:REALM2TerrFresh 0.018 -0.031 -0.010 -0.025 -0.006 -0.042 0.005 -0.016 0.023
temptrend_abs.sc:human_bowler.sc:REALM2Marine -0.003 0.009 0.002 -0.090 -0.003 -0.016 0.031 -0.040 0.128
npp.sc veg.sc drtn.s tm_.:1 tm_.:_. tmptrnd_bs.sc:m.
temptrend_abs.sc
tsign1
tempave_metab.sc
seas.sc
microclim.sc
mass.sc
speed.sc
consumerfrac.sc
npp.sc
veg.sc -0.064
duration.sc 0.023 -0.034
temptrend_abs.sc:tsign1 -0.050 0.004 -0.049
temptrend_abs.sc:tempave_metab.sc -0.049 -0.110 -0.013 0.046
temptrend_abs.sc:microclim.sc 0.210 -0.025 0.056 0.024 -0.112
temptrend_abs.sc:consumerfrac.sc 0.001 -0.014 -0.041 0.034 -0.121 0.003
tsign-1:thermal_bias.sc -0.025 0.035 0.076 -0.044 -0.116 0.002
tsign1:thermal_bias.sc -0.091 0.079 0.047 -0.003 -0.221 0.045
temptrend_abs.sc:npp.sc -0.743 -0.004 -0.038 0.018 0.070 -0.316
human_bowler.sc:REALM2TerrFresh -0.059 0.009 -0.024 -0.015 -0.009 0.005
human_bowler.sc:REALM2Marine -0.231 0.062 0.019 0.006 -0.080 -0.027
temptrend_abs.sc:tsign-1:thermal_bias.sc 0.010 -0.057 -0.048 0.241 0.178 -0.083
temptrend_abs.sc:tsign1:thermal_bias.sc 0.083 -0.064 -0.032 -0.026 0.304 -0.179
temptrend_abs.sc:human_bowler.sc:REALM2TerrFresh 0.017 0.003 0.014 0.024 0.031 0.036
temptrend_abs.sc:human_bowler.sc:REALM2Marine 0.180 0.022 -0.020 -0.025 0.126 -0.020
tmptrnd_bs.sc:c. t-1:_. ts1:_. tmptrnd_bs.sc:n. h_.:REALM2T
temptrend_abs.sc
tsign1
tempave_metab.sc
seas.sc
microclim.sc
mass.sc
speed.sc
consumerfrac.sc
npp.sc
veg.sc
duration.sc
temptrend_abs.sc:tsign1
temptrend_abs.sc:tempave_metab.sc
temptrend_abs.sc:microclim.sc
temptrend_abs.sc:consumerfrac.sc
tsign-1:thermal_bias.sc -0.002
tsign1:thermal_bias.sc 0.021 0.323
temptrend_abs.sc:npp.sc -0.002 0.024 0.081
human_bowler.sc:REALM2TerrFresh 0.019 0.074 0.118 -0.018
human_bowler.sc:REALM2Marine 0.069 0.085 0.112 0.176 0.033
temptrend_abs.sc:tsign-1:thermal_bias.sc 0.005 -0.488 -0.281 0.006 -0.085
temptrend_abs.sc:tsign1:thermal_bias.sc 0.003 -0.242 -0.714 -0.061 -0.091
temptrend_abs.sc:human_bowler.sc:REALM2TerrFresh -0.020 -0.071 -0.086 -0.013 -0.630
temptrend_abs.sc:human_bowler.sc:REALM2Marine -0.139 -0.046 -0.080 -0.231 -0.014
h_.:REALM2M t_.:-1 t_.:1: t_.:_.:REALM2T
temptrend_abs.sc
tsign1
tempave_metab.sc
seas.sc
microclim.sc
mass.sc
speed.sc
consumerfrac.sc
npp.sc
veg.sc
duration.sc
temptrend_abs.sc:tsign1
temptrend_abs.sc:tempave_metab.sc
temptrend_abs.sc:microclim.sc
temptrend_abs.sc:consumerfrac.sc
tsign-1:thermal_bias.sc
tsign1:thermal_bias.sc
temptrend_abs.sc:npp.sc
human_bowler.sc:REALM2TerrFresh
human_bowler.sc:REALM2Marine
temptrend_abs.sc:tsign-1:thermal_bias.sc -0.053
temptrend_abs.sc:tsign1:thermal_bias.sc -0.085 0.369
temptrend_abs.sc:human_bowler.sc:REALM2TerrFresh -0.014 0.137 0.106
temptrend_abs.sc:human_bowler.sc:REALM2Marine -0.771 0.044 0.085 0.011
Standardized Within-Group Residuals:
Min Q1 Med Q3 Max
-6.63842790 -0.23658104 -0.02245775 0.26774537 5.41648169
Number of Observations: 36017
Number of Groups:
STUDY_ID rarefyID %in% STUDY_ID
231 36017
summary(modTsimpJbetarem0)
Linear mixed-effects model fit by maximum likelihood
Data: trends[i2, ]
Random effects:
Formula: ~temptrend_abs.sc | STUDY_ID
Structure: General positive-definite, Log-Cholesky parametrization
StdDev Corr
(Intercept) 0.006875615 (Intr)
temptrend_abs.sc 0.016512162 -0.015
Formula: ~1 | rarefyID %in% STUDY_ID
(Intercept) Residual
StdDev: 0.00367393 0.9559692
Variance function:
Structure: Power of variance covariate
Formula: ~nyrBT
Parameter estimates:
power
-1.889706
Fixed effects: Jbetatrendrem0 ~ temptrend_abs.sc + REALM + tsign + tempave_metab.sc + microclim.sc + mass.sc + consumerfrac.sc + nspp.sc + npp.sc + veg.sc + duration.sc + temptrend_abs.sc:REALM + temptrend_abs.sc:tsign + temptrend_abs.sc:tempave_metab.sc + temptrend_abs.sc:microclim.sc + temptrend_abs.sc:consumerfrac.sc + temptrend_abs.sc:nspp.sc + tsign:thermal_bias.sc + temptrend_abs.sc:npp.sc + temptrend_abs.sc:veg.sc + human_bowler.sc:REALM2 + temptrend_abs.sc:tsign:thermal_bias.sc + temptrend_abs.sc:human_bowler.sc:REALM2
Correlation:
(Intr) tmpt_. REALMM REALMT tsign1 tmpv_. mcrcl. mss.sc cnsmr.
temptrend_abs.sc -0.565
REALMMarine -0.949 0.549
REALMTerrestrial -0.765 0.391 0.722
tsign1 -0.088 0.041 0.013 -0.012
tempave_metab.sc 0.123 -0.049 -0.106 -0.257 0.095
microclim.sc -0.066 0.050 0.071 0.039 0.013 -0.195
mass.sc 0.168 0.015 -0.118 -0.096 -0.025 0.032 0.041
consumerfrac.sc -0.006 0.009 0.009 0.088 -0.036 -0.118 0.028 -0.001
nspp.sc -0.013 -0.021 -0.045 -0.016 0.062 -0.188 -0.145 0.026 0.129
npp.sc -0.001 0.014 -0.022 0.038 0.080 0.104 -0.138 0.047 -0.039
veg.sc -0.449 0.370 0.471 0.019 -0.011 -0.014 -0.013 -0.004 -0.017
duration.sc -0.048 0.019 0.020 -0.026 -0.150 0.160 -0.034 -0.025 0.008
temptrend_abs.sc:REALMMarine 0.551 -0.958 -0.566 -0.372 -0.012 0.041 -0.052 0.008 -0.009
temptrend_abs.sc:REALMTerrestrial 0.385 -0.774 -0.366 -0.531 0.018 0.151 0.002 0.001 -0.062
temptrend_abs.sc:tsign1 0.053 -0.126 -0.024 0.002 -0.440 -0.049 -0.010 0.017 0.007
temptrend_abs.sc:tempave_metab.sc -0.035 0.101 0.029 0.158 -0.101 -0.521 0.030 -0.007 0.109
temptrend_abs.sc:microclim.sc 0.048 -0.064 -0.052 -0.018 -0.017 0.124 -0.781 -0.027 -0.014
temptrend_abs.sc:consumerfrac.sc -0.002 -0.020 -0.001 -0.057 0.031 0.090 0.005 -0.035 -0.715
temptrend_abs.sc:nspp.sc -0.007 0.009 0.026 0.020 -0.031 0.112 0.073 -0.020 -0.070
tsign-1:thermal_bias.sc 0.033 -0.005 -0.020 -0.066 -0.088 0.157 0.011 0.000 0.000
tsign1:thermal_bias.sc 0.067 -0.023 -0.052 -0.144 0.041 0.318 -0.089 0.063 -0.049
temptrend_abs.sc:npp.sc 0.014 0.023 0.005 -0.044 -0.050 -0.043 0.148 -0.006 0.009
temptrend_abs.sc:veg.sc 0.358 -0.449 -0.374 0.005 -0.008 -0.005 0.006 0.003 0.009
human_bowler.sc:REALM2TerrFresh -0.107 0.124 0.114 -0.027 0.016 0.003 0.116 0.011 -0.039
human_bowler.sc:REALM2Marine 0.023 -0.010 -0.013 -0.055 -0.019 0.134 0.051 0.035 -0.087
temptrend_abs.sc:tsign-1:thermal_bias.sc -0.013 0.012 0.012 0.071 -0.069 -0.103 0.002 -0.016 0.013
temptrend_abs.sc:tsign1:thermal_bias.sc -0.021 0.053 0.013 0.099 -0.006 -0.161 0.018 -0.045 0.025
temptrend_abs.sc:human_bowler.sc:REALM2TerrFresh 0.145 -0.206 -0.155 0.024 -0.015 -0.017 -0.068 -0.010 0.025
temptrend_abs.sc:human_bowler.sc:REALM2Marine -0.015 0.016 0.009 0.048 0.006 -0.101 -0.024 -0.016 0.134
nspp.s npp.sc veg.sc drtn.s t_.:REALMM t_.:REALMT tm_.:1 tm_.:_.
temptrend_abs.sc
REALMMarine
REALMTerrestrial
tsign1
tempave_metab.sc
microclim.sc
mass.sc
consumerfrac.sc
nspp.sc
npp.sc -0.245
veg.sc 0.029 -0.197
duration.sc -0.141 0.074 -0.011
temptrend_abs.sc:REALMMarine 0.043 0.020 -0.389 0.019
temptrend_abs.sc:REALMTerrestrial 0.034 -0.053 0.008 0.025 0.730
temptrend_abs.sc:tsign1 -0.003 -0.068 -0.025 -0.037 0.047 0.004
temptrend_abs.sc:tempave_metab.sc 0.081 -0.046 0.000 -0.051 -0.072 -0.281 0.044
temptrend_abs.sc:microclim.sc 0.084 0.162 0.003 0.028 0.070 -0.029 0.015 0.028
temptrend_abs.sc:consumerfrac.sc -0.100 0.017 0.003 -0.008 0.021 0.086 0.015 -0.152
temptrend_abs.sc:nspp.sc -0.592 0.133 -0.031 -0.010 -0.058 -0.050 -0.016 -0.083
tsign-1:thermal_bias.sc -0.053 -0.019 0.005 0.077 0.011 0.048 -0.053 -0.072
tsign1:thermal_bias.sc -0.085 -0.088 0.030 0.075 0.014 0.107 0.005 -0.198
temptrend_abs.sc:npp.sc 0.144 -0.737 0.153 -0.069 -0.063 0.061 0.029 0.076
temptrend_abs.sc:veg.sc -0.035 0.174 -0.815 0.021 0.474 -0.006 0.051 -0.023
human_bowler.sc:REALM2TerrFresh 0.005 -0.130 0.256 -0.029 -0.134 0.023 -0.024 -0.008
human_bowler.sc:REALM2Marine -0.045 -0.235 0.049 0.024 0.005 0.042 0.008 -0.087
temptrend_abs.sc:tsign-1:thermal_bias.sc 0.003 0.012 -0.005 -0.064 -0.026 -0.112 0.274 0.225
temptrend_abs.sc:tsign1:thermal_bias.sc 0.037 0.090 -0.047 -0.058 -0.031 -0.166 -0.018 0.374
temptrend_abs.sc:human_bowler.sc:REALM2TerrFresh 0.006 0.100 -0.354 0.025 0.220 -0.026 0.044 0.037
temptrend_abs.sc:human_bowler.sc:REALM2Marine 0.037 0.181 -0.040 -0.014 -0.008 -0.054 -0.015 0.126
tmptrnd_bs.sc:m. tmptrnd_bs.sc:c. tmptrnd_bs.sc:ns. t-1:_.
temptrend_abs.sc
REALMMarine
REALMTerrestrial
tsign1
tempave_metab.sc
microclim.sc
mass.sc
consumerfrac.sc
nspp.sc
npp.sc
veg.sc
duration.sc
temptrend_abs.sc:REALMMarine
temptrend_abs.sc:REALMTerrestrial
temptrend_abs.sc:tsign1
temptrend_abs.sc:tempave_metab.sc
temptrend_abs.sc:microclim.sc
temptrend_abs.sc:consumerfrac.sc -0.021
temptrend_abs.sc:nspp.sc -0.048 0.133
tsign-1:thermal_bias.sc -0.009 -0.002 0.013
tsign1:thermal_bias.sc 0.037 0.031 0.004 0.258
temptrend_abs.sc:npp.sc -0.283 -0.025 -0.143 0.018
temptrend_abs.sc:veg.sc 0.035 -0.004 0.018 -0.006
human_bowler.sc:REALM2TerrFresh -0.031 0.022 0.025 0.054
human_bowler.sc:REALM2Marine -0.040 0.084 0.056 0.072
temptrend_abs.sc:tsign-1:thermal_bias.sc -0.029 -0.010 0.014 -0.414
temptrend_abs.sc:tsign1:thermal_bias.sc -0.096 -0.027 -0.033 -0.186
temptrend_abs.sc:human_bowler.sc:REALM2TerrFresh 0.091 -0.026 -0.019 -0.054
temptrend_abs.sc:human_bowler.sc:REALM2Marine -0.020 -0.137 -0.063 -0.048
ts1:_. tmptrnd_bs.sc:np. tmptrnd_bs.sc:v. h_.:REALM2T
temptrend_abs.sc
REALMMarine
REALMTerrestrial
tsign1
tempave_metab.sc
microclim.sc
mass.sc
consumerfrac.sc
nspp.sc
npp.sc
veg.sc
duration.sc
temptrend_abs.sc:REALMMarine
temptrend_abs.sc:REALMTerrestrial
temptrend_abs.sc:tsign1
temptrend_abs.sc:tempave_metab.sc
temptrend_abs.sc:microclim.sc
temptrend_abs.sc:consumerfrac.sc
temptrend_abs.sc:nspp.sc
tsign-1:thermal_bias.sc
tsign1:thermal_bias.sc
temptrend_abs.sc:npp.sc 0.094
temptrend_abs.sc:veg.sc -0.055 -0.264
human_bowler.sc:REALM2TerrFresh 0.129 0.059 -0.302
human_bowler.sc:REALM2Marine 0.069 0.177 -0.044 0.045
temptrend_abs.sc:tsign-1:thermal_bias.sc -0.258 -0.009 -0.001 -0.092
temptrend_abs.sc:tsign1:thermal_bias.sc -0.712 -0.085 0.049 -0.104
temptrend_abs.sc:human_bowler.sc:REALM2TerrFresh -0.109 -0.143 0.463 -0.752
temptrend_abs.sc:human_bowler.sc:REALM2Marine -0.066 -0.214 0.059 -0.040
h_.:REALM2M t_.:-1 t_.:1: t_.:_.:REALM2T
temptrend_abs.sc
REALMMarine
REALMTerrestrial
tsign1
tempave_metab.sc
microclim.sc
mass.sc
consumerfrac.sc
nspp.sc
npp.sc
veg.sc
duration.sc
temptrend_abs.sc:REALMMarine
temptrend_abs.sc:REALMTerrestrial
temptrend_abs.sc:tsign1
temptrend_abs.sc:tempave_metab.sc
temptrend_abs.sc:microclim.sc
temptrend_abs.sc:consumerfrac.sc
temptrend_abs.sc:nspp.sc
tsign-1:thermal_bias.sc
tsign1:thermal_bias.sc
temptrend_abs.sc:npp.sc
temptrend_abs.sc:veg.sc
human_bowler.sc:REALM2TerrFresh
human_bowler.sc:REALM2Marine
temptrend_abs.sc:tsign-1:thermal_bias.sc -0.044
temptrend_abs.sc:tsign1:thermal_bias.sc -0.070 0.384
temptrend_abs.sc:human_bowler.sc:REALM2TerrFresh -0.036 0.124 0.123
temptrend_abs.sc:human_bowler.sc:REALM2Marine -0.759 0.041 0.074 0.037
Standardized Within-Group Residuals:
Min Q1 Med Q3 Max
-8.39440359 -0.32029428 -0.03087913 0.31695654 8.33262939
Number of Observations: 36017
Number of Groups:
STUDY_ID rarefyID %in% STUDY_ID
231 36017
summary(modTsimpHornrem0)
Linear mixed-effects model fit by maximum likelihood
Data: trends[i3, ]
Random effects:
Formula: ~temptrend_abs.sc | STUDY_ID
Structure: General positive-definite, Log-Cholesky parametrization
StdDev Corr
(Intercept) 0.01429668 (Intr)
temptrend_abs.sc 0.02508293 0.046
Formula: ~1 | rarefyID %in% STUDY_ID
(Intercept) Residual
StdDev: 0.01877495 2.44238
Variance function:
Structure: Power of variance covariate
Formula: ~nyrBT
Parameter estimates:
power
-2.326836
Fixed effects: Horntrendrem0 ~ temptrend_abs.sc + REALM + tsign + tempave_metab.sc + seas.sc + mass.sc + speed.sc + consumerfrac.sc + nspp.sc + npp.sc + veg.sc + duration.sc + temptrend_abs.sc:REALM + temptrend_abs.sc:tsign + temptrend_abs.sc:consumerfrac.sc + tsign:thermal_bias.sc + temptrend_abs.sc:npp.sc + temptrend_abs.sc:veg.sc + human_bowler.sc:REALM2 + temptrend_abs.sc:tsign:thermal_bias.sc + temptrend_abs.sc:human_bowler.sc:REALM2
Correlation:
(Intr) tmpt_. REALMM REALMT tsign1 tmpv_. ses.sc mss.sc spd.sc
temptrend_abs.sc -0.472
REALMMarine -0.957 0.456
REALMTerrestrial -0.747 0.335 0.698
tsign1 -0.069 0.049 0.003 0.012
tempave_metab.sc 0.100 -0.003 -0.081 -0.205 0.009
seas.sc -0.085 -0.012 0.130 -0.038 -0.076 0.083
mass.sc 0.078 0.006 -0.054 -0.043 0.002 0.081 0.078
speed.sc 0.073 0.004 -0.027 -0.054 -0.057 -0.058 0.024 -0.428
consumerfrac.sc -0.013 0.009 0.009 0.072 0.031 -0.087 -0.058 0.004 -0.063
nspp.sc -0.011 -0.025 -0.031 -0.030 0.054 -0.155 0.037 -0.065 0.132
npp.sc 0.000 0.037 -0.013 0.067 0.014 -0.041 -0.137 -0.046 0.136
veg.sc -0.539 0.287 0.557 0.044 -0.007 -0.003 0.035 0.006 -0.016
duration.sc -0.027 0.038 0.016 0.010 -0.157 0.127 -0.080 0.002 -0.005
temptrend_abs.sc:REALMMarine 0.460 -0.958 -0.466 -0.319 -0.023 0.014 0.019 0.008 0.004
temptrend_abs.sc:REALMTerrestrial 0.319 -0.781 -0.301 -0.438 -0.009 0.020 -0.017 -0.009 0.010
temptrend_abs.sc:tsign1 0.043 -0.116 -0.014 0.000 -0.488 -0.021 -0.015 0.005 0.022
temptrend_abs.sc:consumerfrac.sc 0.008 -0.018 -0.012 -0.034 -0.011 0.028 0.003 -0.027 0.019
tsign-1:thermal_bias.sc 0.049 -0.002 -0.044 -0.067 -0.099 0.201 -0.173 -0.037 -0.004
tsign1:thermal_bias.sc 0.083 -0.006 -0.086 -0.114 0.060 0.324 -0.303 0.000 -0.031
temptrend_abs.sc:npp.sc 0.033 -0.026 -0.028 -0.057 -0.004 0.060 -0.044 0.024 -0.065
temptrend_abs.sc:veg.sc 0.317 -0.445 -0.326 0.003 -0.022 -0.013 0.009 -0.003 0.010
human_bowler.sc:REALM2TerrFresh -0.056 0.056 0.057 -0.026 0.018 0.034 -0.048 0.031 -0.033
human_bowler.sc:REALM2Marine 0.032 -0.007 -0.036 -0.037 -0.015 0.092 -0.127 -0.010 0.017
temptrend_abs.sc:tsign-1:thermal_bias.sc -0.007 -0.013 0.008 0.036 -0.038 0.016 0.042 0.007 -0.007
temptrend_abs.sc:tsign1:thermal_bias.sc -0.017 0.009 0.015 0.042 0.023 0.040 0.075 0.003 -0.022
temptrend_abs.sc:human_bowler.sc:REALM2TerrFresh 0.116 -0.209 -0.121 0.017 -0.016 -0.005 0.027 -0.009 0.003
temptrend_abs.sc:human_bowler.sc:REALM2Marine -0.019 0.009 0.024 0.029 0.007 -0.039 0.047 0.011 -0.016
cnsmr. nspp.s npp.sc veg.sc drtn.s t_.:REALMM t_.:REALMT tm_.:1
temptrend_abs.sc
REALMMarine
REALMTerrestrial
tsign1
tempave_metab.sc
seas.sc
mass.sc
speed.sc
consumerfrac.sc
nspp.sc 0.089
npp.sc -0.018 -0.203
veg.sc 0.002 0.011 -0.159
duration.sc 0.016 -0.201 0.039 -0.005
temptrend_abs.sc:REALMMarine -0.017 0.016 -0.006 -0.301 -0.001
temptrend_abs.sc:REALMTerrestrial -0.025 0.025 -0.054 0.008 -0.004 0.738
temptrend_abs.sc:tsign1 -0.013 -0.016 -0.038 -0.011 -0.007 0.043 0.012
temptrend_abs.sc:consumerfrac.sc -0.712 -0.017 -0.010 -0.009 -0.008 0.029 0.040 0.038
tsign-1:thermal_bias.sc -0.003 -0.047 -0.017 0.007 0.071 0.006 0.040 -0.025
tsign1:thermal_bias.sc -0.008 -0.073 -0.113 0.008 0.056 0.001 0.057 0.010
temptrend_abs.sc:npp.sc -0.017 0.064 -0.650 0.098 -0.017 -0.015 0.076 0.001
temptrend_abs.sc:veg.sc -0.003 -0.016 0.148 -0.616 0.006 0.467 -0.024 0.061
human_bowler.sc:REALM2TerrFresh -0.029 0.018 -0.082 0.138 -0.009 -0.062 0.035 -0.013
human_bowler.sc:REALM2Marine -0.054 -0.025 -0.230 0.036 0.034 0.013 0.025 0.013
temptrend_abs.sc:tsign-1:thermal_bias.sc -0.014 0.000 0.009 -0.009 -0.033 -0.003 -0.060 0.262
temptrend_abs.sc:tsign1:thermal_bias.sc -0.028 -0.012 0.100 -0.027 -0.028 0.002 -0.078 -0.029
temptrend_abs.sc:human_bowler.sc:REALM2TerrFresh 0.004 -0.009 0.071 -0.262 0.017 0.220 -0.031 0.049
temptrend_abs.sc:human_bowler.sc:REALM2Marine 0.127 0.002 0.174 -0.024 -0.014 -0.015 -0.028 -0.009
tmptrnd_bs.sc:c. t-1:_. ts1:_. tmptrnd_bs.sc:n. tmptrnd_bs.sc:v.
temptrend_abs.sc
REALMMarine
REALMTerrestrial
tsign1
tempave_metab.sc
seas.sc
mass.sc
speed.sc
consumerfrac.sc
nspp.sc
npp.sc
veg.sc
duration.sc
temptrend_abs.sc:REALMMarine
temptrend_abs.sc:REALMTerrestrial
temptrend_abs.sc:tsign1
temptrend_abs.sc:consumerfrac.sc
tsign-1:thermal_bias.sc 0.003
tsign1:thermal_bias.sc 0.013 0.370
temptrend_abs.sc:npp.sc 0.014 0.018 0.095
temptrend_abs.sc:veg.sc 0.007 -0.007 -0.039 -0.231
human_bowler.sc:REALM2TerrFresh 0.011 0.057 0.115 0.043 -0.194
human_bowler.sc:REALM2Marine 0.068 0.113 0.140 0.174 -0.041
temptrend_abs.sc:tsign-1:thermal_bias.sc 0.026 -0.452 -0.220 -0.033 0.018
temptrend_abs.sc:tsign1:thermal_bias.sc 0.034 -0.210 -0.614 -0.159 0.067
temptrend_abs.sc:human_bowler.sc:REALM2TerrFresh 0.002 -0.063 -0.091 -0.112 0.492
temptrend_abs.sc:human_bowler.sc:REALM2Marine -0.147 -0.062 -0.094 -0.265 0.060
h_.:REALM2T h_.:REALM2M t_.:-1 t_.:1: t_.:_.:REALM2T
temptrend_abs.sc
REALMMarine
REALMTerrestrial
tsign1
tempave_metab.sc
seas.sc
mass.sc
speed.sc
consumerfrac.sc
nspp.sc
npp.sc
veg.sc
duration.sc
temptrend_abs.sc:REALMMarine
temptrend_abs.sc:REALMTerrestrial
temptrend_abs.sc:tsign1
temptrend_abs.sc:consumerfrac.sc
tsign-1:thermal_bias.sc
tsign1:thermal_bias.sc
temptrend_abs.sc:npp.sc
temptrend_abs.sc:veg.sc
human_bowler.sc:REALM2TerrFresh
human_bowler.sc:REALM2Marine 0.035
temptrend_abs.sc:tsign-1:thermal_bias.sc -0.057 -0.046
temptrend_abs.sc:tsign1:thermal_bias.sc -0.062 -0.085 0.361
temptrend_abs.sc:human_bowler.sc:REALM2TerrFresh -0.537 -0.031 0.142 0.132
temptrend_abs.sc:human_bowler.sc:REALM2Marine -0.021 -0.728 0.021 0.052 0.033
Standardized Within-Group Residuals:
Min Q1 Med Q3 Max
-5.66375573 -0.23464298 -0.02584232 0.23186565 5.76940752
Number of Observations: 35327
Number of Groups:
STUDY_ID rarefyID %in% STUDY_ID
200 35327
summary(modTfullHornTerr)
Linear mixed-effects model fit by REML
Data: trends[i1, ]
Random effects:
Formula: ~temptrend_abs.sc | STUDY_ID
Structure: General positive-definite, Log-Cholesky parametrization
StdDev Corr
(Intercept) 0.009555472 (Intr)
temptrend_abs.sc 0.022365121 0.313
Formula: ~1 | rarefyID %in% STUDY_ID
(Intercept) Residual
StdDev: 0.004029061 1.695873
Variance function:
Structure: Power of variance covariate
Formula: ~nyrBT
Parameter estimates:
power
-2.036154
Fixed effects: Horntrendrem0 ~ temptrend_abs.sc * tsign + temptrend_abs.sc * tempave_metab.sc + temptrend_abs.sc * seas.sc + temptrend_abs.sc * microclim.sc + temptrend_abs.sc * mass.sc + temptrend_abs.sc * speed.sc + temptrend_abs.sc * consumerfrac.sc + temptrend_abs.sc * nspp.sc + temptrend_abs.sc * thermal_bias.sc:tsign + temptrend_abs.sc * npp.sc + temptrend_abs.sc * veg.sc + temptrend_abs.sc * duration.sc + temptrend_abs.sc * human_bowler.sc
Correlation:
(Intr) tmpt_. tsign1 tmpv_. ses.sc mcrcl. mss.sc spd.sc cnsmr.
temptrend_abs.sc -0.629
tsign1 -0.215 0.019
tempave_metab.sc -0.486 0.307 -0.209
seas.sc -0.258 0.267 -0.078 0.049
microclim.sc -0.182 0.232 0.094 -0.018 0.473
mass.sc 0.515 -0.246 -0.010 -0.141 0.008 0.039
speed.sc 0.102 0.048 -0.033 -0.595 -0.025 -0.031 -0.141
consumerfrac.sc 0.356 -0.340 0.181 0.004 -0.048 0.072 0.424 -0.654
nspp.sc -0.064 0.025 -0.016 -0.061 -0.118 -0.161 -0.012 0.032 0.000
npp.sc -0.044 0.007 0.118 -0.045 0.204 0.149 0.011 0.013 -0.007
veg.sc -0.213 0.262 -0.078 -0.082 -0.069 -0.106 0.001 0.198 -0.160
duration.sc -0.098 0.042 -0.186 0.067 0.069 -0.016 -0.013 -0.051 0.138
human_bowler.sc -0.229 0.250 0.042 0.057 -0.059 0.150 -0.120 0.007 -0.147
temptrend_abs.sc:tsign1 0.169 -0.306 -0.490 0.093 -0.109 -0.195 0.015 0.050 -0.111
temptrend_abs.sc:tempave_metab.sc 0.296 -0.503 0.138 -0.662 -0.039 -0.003 0.002 0.427 -0.032
temptrend_abs.sc:seas.sc 0.219 -0.380 0.028 -0.025 -0.748 -0.378 -0.012 0.008 0.045
temptrend_abs.sc:microclim.sc 0.174 -0.290 -0.097 0.007 -0.367 -0.845 -0.034 0.038 -0.071
temptrend_abs.sc:mass.sc -0.313 0.361 0.005 -0.015 -0.041 -0.038 -0.642 0.280 -0.433
temptrend_abs.sc:speed.sc 0.039 0.012 0.007 0.427 0.048 0.058 0.213 -0.732 0.560
temptrend_abs.sc:consumerfrac.sc -0.283 0.407 -0.096 -0.047 -0.009 -0.066 -0.336 0.552 -0.784
temptrend_abs.sc:nspp.sc 0.025 -0.086 0.006 0.050 0.053 0.060 -0.005 0.003 -0.014
tsign-1:thermal_bias.sc -0.091 -0.062 0.667 -0.179 -0.286 -0.090 0.013 -0.024 0.140
tsign1:thermal_bias.sc 0.212 -0.208 -0.065 -0.033 -0.666 -0.403 0.049 0.039 -0.026
temptrend_abs.sc:npp.sc 0.027 0.023 -0.116 0.050 -0.131 -0.072 -0.023 -0.018 0.004
temptrend_abs.sc:veg.sc 0.225 -0.308 0.055 0.044 0.027 0.048 0.031 -0.133 0.116
temptrend_abs.sc:duration.sc -0.064 0.147 0.020 -0.086 -0.033 0.033 0.001 0.020 -0.059
temptrend_abs.sc:human_bowler.sc 0.242 -0.331 -0.037 -0.055 -0.037 -0.159 0.096 0.004 0.106
temptrend_abs.sc:tsign-1:thermal_bias.sc 0.049 -0.049 -0.379 0.107 0.218 0.025 -0.004 0.036 -0.095
temptrend_abs.sc:tsign1:thermal_bias.sc -0.140 0.284 0.118 -0.001 0.450 0.297 -0.010 -0.009 0.032
nspp.s npp.sc veg.sc drtn.s hmn_b. tm_.:1 tmptrnd_bs.sc:t_.
temptrend_abs.sc
tsign1
tempave_metab.sc
seas.sc
microclim.sc
mass.sc
speed.sc
consumerfrac.sc
nspp.sc
npp.sc -0.064
veg.sc -0.038 -0.553
duration.sc -0.012 -0.020 -0.022
human_bowler.sc 0.019 -0.190 0.287 -0.127
temptrend_abs.sc:tsign1 -0.013 -0.123 0.012 0.122 -0.120
temptrend_abs.sc:tempave_metab.sc 0.065 0.034 0.059 -0.090 -0.025 -0.077
temptrend_abs.sc:seas.sc 0.073 -0.106 0.012 -0.028 -0.077 0.146 0.033
temptrend_abs.sc:microclim.sc 0.090 -0.089 0.054 0.026 -0.139 0.232 0.001
temptrend_abs.sc:mass.sc 0.018 -0.026 0.020 0.031 0.088 0.053 0.063
temptrend_abs.sc:speed.sc -0.016 -0.007 -0.133 0.034 0.004 -0.073 -0.598
temptrend_abs.sc:consumerfrac.sc 0.017 0.007 0.087 -0.118 0.068 0.101 0.017
temptrend_abs.sc:nspp.sc -0.603 0.011 0.028 -0.007 0.055 0.019 -0.015
tsign-1:thermal_bias.sc 0.004 0.115 -0.079 -0.062 0.055 -0.214 0.119
tsign1:thermal_bias.sc -0.028 0.143 -0.091 -0.017 0.084 0.301 0.012
temptrend_abs.sc:npp.sc 0.003 -0.880 0.494 0.021 0.147 0.149 -0.046
temptrend_abs.sc:veg.sc 0.013 0.504 -0.847 0.026 -0.301 -0.005 -0.071
temptrend_abs.sc:duration.sc 0.152 0.001 0.010 -0.250 0.105 -0.223 0.094
temptrend_abs.sc:human_bowler.sc 0.032 0.135 -0.334 0.116 -0.798 0.151 0.051
temptrend_abs.sc:tsign-1:thermal_bias.sc -0.015 -0.268 0.129 0.041 -0.116 0.635 -0.107
temptrend_abs.sc:tsign1:thermal_bias.sc 0.026 -0.186 0.122 -0.028 -0.006 -0.369 -0.014
tmptrnd_bs.sc:ss. tmptrnd_bs.sc:mc. tmptrnd_bs.sc:ms.
temptrend_abs.sc
tsign1
tempave_metab.sc
seas.sc
microclim.sc
mass.sc
speed.sc
consumerfrac.sc
nspp.sc
npp.sc
veg.sc
duration.sc
human_bowler.sc
temptrend_abs.sc:tsign1
temptrend_abs.sc:tempave_metab.sc
temptrend_abs.sc:seas.sc
temptrend_abs.sc:microclim.sc 0.453
temptrend_abs.sc:mass.sc 0.028 0.039
temptrend_abs.sc:speed.sc -0.029 -0.063 -0.439
temptrend_abs.sc:consumerfrac.sc -0.017 0.081 0.549
temptrend_abs.sc:nspp.sc -0.055 -0.058 0.002
tsign-1:thermal_bias.sc 0.198 0.050 0.011
tsign1:thermal_bias.sc 0.496 0.298 0.021
temptrend_abs.sc:npp.sc 0.078 0.074 0.011
temptrend_abs.sc:veg.sc 0.016 -0.034 -0.028
temptrend_abs.sc:duration.sc 0.012 -0.038 -0.011
temptrend_abs.sc:human_bowler.sc 0.066 0.201 -0.080
temptrend_abs.sc:tsign-1:thermal_bias.sc -0.305 -0.022 0.054
temptrend_abs.sc:tsign1:thermal_bias.sc -0.615 -0.339 -0.018
tmptrnd_bs.sc:sp. tmptrnd_bs.sc:c. tmptrnd_bs.sc:ns. t-1:_.
temptrend_abs.sc
tsign1
tempave_metab.sc
seas.sc
microclim.sc
mass.sc
speed.sc
consumerfrac.sc
nspp.sc
npp.sc
veg.sc
duration.sc
human_bowler.sc
temptrend_abs.sc:tsign1
temptrend_abs.sc:tempave_metab.sc
temptrend_abs.sc:seas.sc
temptrend_abs.sc:microclim.sc
temptrend_abs.sc:mass.sc
temptrend_abs.sc:speed.sc
temptrend_abs.sc:consumerfrac.sc -0.699
temptrend_abs.sc:nspp.sc -0.032 0.012
tsign-1:thermal_bias.sc -0.014 -0.061 0.022
tsign1:thermal_bias.sc -0.027 0.039 0.049 0.281
temptrend_abs.sc:npp.sc 0.033 -0.034 -0.024 -0.123
temptrend_abs.sc:veg.sc 0.147 -0.097 -0.050 0.076
temptrend_abs.sc:duration.sc -0.015 0.043 -0.259 0.026
temptrend_abs.sc:human_bowler.sc -0.030 -0.066 -0.053 -0.040
temptrend_abs.sc:tsign-1:thermal_bias.sc -0.045 0.083 -0.009 -0.457
temptrend_abs.sc:tsign1:thermal_bias.sc 0.016 -0.024 -0.077 -0.196
ts1:_. tmptrnd_bs.sc:np. tmptrnd_bs.sc:v. tmptrnd_bs.sc:d.
temptrend_abs.sc
tsign1
tempave_metab.sc
seas.sc
microclim.sc
mass.sc
speed.sc
consumerfrac.sc
nspp.sc
npp.sc
veg.sc
duration.sc
human_bowler.sc
temptrend_abs.sc:tsign1
temptrend_abs.sc:tempave_metab.sc
temptrend_abs.sc:seas.sc
temptrend_abs.sc:microclim.sc
temptrend_abs.sc:mass.sc
temptrend_abs.sc:speed.sc
temptrend_abs.sc:consumerfrac.sc
temptrend_abs.sc:nspp.sc
tsign-1:thermal_bias.sc
tsign1:thermal_bias.sc
temptrend_abs.sc:npp.sc -0.152
temptrend_abs.sc:veg.sc 0.111 -0.609
temptrend_abs.sc:duration.sc -0.064 -0.005 0.004
temptrend_abs.sc:human_bowler.sc -0.044 -0.180 0.418 -0.105
temptrend_abs.sc:tsign-1:thermal_bias.sc -0.267 0.311 -0.156 -0.092
temptrend_abs.sc:tsign1:thermal_bias.sc -0.831 0.198 -0.155 0.085
tmptrnd_bs.sc:h_. t_.:-1
temptrend_abs.sc
tsign1
tempave_metab.sc
seas.sc
microclim.sc
mass.sc
speed.sc
consumerfrac.sc
nspp.sc
npp.sc
veg.sc
duration.sc
human_bowler.sc
temptrend_abs.sc:tsign1
temptrend_abs.sc:tempave_metab.sc
temptrend_abs.sc:seas.sc
temptrend_abs.sc:microclim.sc
temptrend_abs.sc:mass.sc
temptrend_abs.sc:speed.sc
temptrend_abs.sc:consumerfrac.sc
temptrend_abs.sc:nspp.sc
tsign-1:thermal_bias.sc
tsign1:thermal_bias.sc
temptrend_abs.sc:npp.sc
temptrend_abs.sc:veg.sc
temptrend_abs.sc:duration.sc
temptrend_abs.sc:human_bowler.sc
temptrend_abs.sc:tsign-1:thermal_bias.sc 0.169
temptrend_abs.sc:tsign1:thermal_bias.sc 0.038 0.319
Standardized Within-Group Residuals:
Min Q1 Med Q3 Max
-5.32506581 -0.38770014 -0.04491269 0.36618931 5.19217938
Number of Observations: 2299
Number of Groups:
STUDY_ID rarefyID %in% STUDY_ID
90 2299
summary(modTfullHornFresh)
Linear mixed-effects model fit by REML
Data: trends[i2, ]
Random effects:
Formula: ~temptrend_abs.sc | STUDY_ID
Structure: General positive-definite, Log-Cholesky parametrization
StdDev Corr
(Intercept) 3.088553e-08 (Intr)
temptrend_abs.sc 2.055026e-02 0.025
Formula: ~1 | rarefyID %in% STUDY_ID
(Intercept) Residual
StdDev: 0.02085277 2.44783
Variance function:
Structure: Power of variance covariate
Formula: ~nyrBT
Parameter estimates:
power
-2.345198
Fixed effects: Horntrendrem0 ~ temptrend_abs.sc * tsign + temptrend_abs.sc * tempave_metab.sc + temptrend_abs.sc * seas.sc + temptrend_abs.sc * microclim.sc + temptrend_abs.sc * mass.sc + temptrend_abs.sc * speed.sc + temptrend_abs.sc * nspp.sc + temptrend_abs.sc * thermal_bias.sc:tsign + temptrend_abs.sc * npp.sc + temptrend_abs.sc * veg.sc + temptrend_abs.sc * duration.sc + temptrend_abs.sc * human_bowler.sc
Correlation:
(Intr) tmpt_. tsign1 tmpv_. ses.sc mcrcl. mss.sc spd.sc nspp.s
temptrend_abs.sc -0.602
tsign1 -0.231 0.096
tempave_metab.sc 0.484 -0.185 0.121
seas.sc 0.008 -0.055 0.022 0.354
microclim.sc -0.132 0.056 0.107 0.381 0.099
mass.sc -0.034 0.042 -0.073 -0.301 0.196 -0.393
speed.sc 0.241 -0.155 0.004 0.232 0.111 0.078 -0.670
nspp.sc 0.125 -0.007 -0.163 -0.343 -0.442 -0.166 0.205 -0.078
npp.sc -0.272 -0.025 0.019 -0.132 0.452 0.147 0.096 -0.007 -0.032
veg.sc -0.543 0.574 -0.027 -0.010 -0.068 -0.128 -0.108 0.065 -0.146
duration.sc -0.134 0.121 -0.187 0.102 -0.026 0.072 -0.112 0.023 -0.208
human_bowler.sc 0.065 0.062 -0.078 -0.106 -0.267 -0.011 0.165 -0.105 -0.048
temptrend_abs.sc:tsign1 0.171 -0.362 -0.534 -0.016 -0.013 -0.007 -0.046 0.047 0.081
temptrend_abs.sc:tempave_metab.sc -0.159 0.098 -0.029 -0.614 -0.427 -0.311 0.204 -0.189 0.196
temptrend_abs.sc:seas.sc -0.021 0.063 0.027 -0.352 -0.697 -0.152 -0.026 -0.180 0.187
temptrend_abs.sc:microclim.sc 0.039 0.000 0.013 -0.258 -0.174 -0.622 0.213 -0.074 0.034
temptrend_abs.sc:mass.sc -0.016 -0.069 -0.010 0.150 -0.015 0.239 -0.674 0.446 -0.105
temptrend_abs.sc:speed.sc -0.130 0.244 0.058 -0.123 -0.179 -0.049 0.420 -0.644 0.022
temptrend_abs.sc:nspp.sc -0.072 -0.009 0.157 0.177 0.134 0.083 -0.160 -0.005 -0.624
tsign-1:thermal_bias.sc 0.429 -0.242 -0.411 0.253 0.043 0.065 -0.035 0.048 0.091
tsign1:thermal_bias.sc 0.218 -0.069 0.138 0.581 0.367 0.124 0.040 0.015 -0.204
temptrend_abs.sc:npp.sc 0.014 0.271 0.009 -0.067 -0.351 -0.074 -0.028 -0.023 0.022
temptrend_abs.sc:veg.sc 0.354 -0.817 0.020 -0.011 0.016 0.060 0.023 -0.036 0.006
temptrend_abs.sc:duration.sc 0.043 -0.011 -0.037 0.044 0.153 0.060 0.045 0.061 0.117
temptrend_abs.sc:human_bowler.sc -0.018 -0.038 0.025 0.193 0.275 0.108 -0.232 0.190 0.007
temptrend_abs.sc:tsign-1:thermal_bias.sc -0.223 0.440 0.187 -0.198 -0.170 -0.066 0.098 -0.065 0.040
temptrend_abs.sc:tsign1:thermal_bias.sc -0.099 0.022 -0.106 -0.344 -0.342 -0.044 -0.075 -0.026 0.075
npp.sc veg.sc drtn.s hmn_b. tm_.:1 tmptrnd_bs.sc:t_.
temptrend_abs.sc
tsign1
tempave_metab.sc
seas.sc
microclim.sc
mass.sc
speed.sc
nspp.sc
npp.sc
veg.sc -0.358
duration.sc 0.041 0.119
human_bowler.sc -0.123 0.057 0.041
temptrend_abs.sc:tsign1 -0.018 -0.047 0.054 -0.032
temptrend_abs.sc:tempave_metab.sc -0.151 -0.024 -0.045 0.298 -0.040
temptrend_abs.sc:seas.sc -0.353 0.010 0.000 0.322 -0.050 0.779
temptrend_abs.sc:microclim.sc -0.108 0.098 -0.008 0.118 -0.070 0.524
temptrend_abs.sc:mass.sc 0.021 0.040 0.076 -0.298 0.097 -0.376
temptrend_abs.sc:speed.sc -0.042 -0.028 0.001 0.200 -0.093 0.226
temptrend_abs.sc:nspp.sc -0.031 0.046 0.116 -0.059 -0.111 -0.251
tsign-1:thermal_bias.sc 0.126 -0.256 0.003 0.055 0.244 -0.183
tsign1:thermal_bias.sc 0.124 0.060 0.027 0.188 -0.140 -0.399
temptrend_abs.sc:npp.sc -0.690 0.340 -0.066 0.117 0.033 0.341
temptrend_abs.sc:veg.sc 0.244 -0.692 -0.075 -0.037 0.106 0.071
temptrend_abs.sc:duration.sc 0.044 -0.090 -0.342 -0.061 0.021 -0.044
temptrend_abs.sc:human_bowler.sc 0.116 0.005 -0.030 -0.709 0.056 -0.499
temptrend_abs.sc:tsign-1:thermal_bias.sc -0.246 0.236 -0.021 0.087 -0.477 0.423
temptrend_abs.sc:tsign1:thermal_bias.sc -0.216 -0.030 0.076 -0.004 0.173 0.585
tmptrnd_bs.sc:ss. tmptrnd_bs.sc:mc. tmptrnd_bs.sc:ms.
temptrend_abs.sc
tsign1
tempave_metab.sc
seas.sc
microclim.sc
mass.sc
speed.sc
nspp.sc
npp.sc
veg.sc
duration.sc
human_bowler.sc
temptrend_abs.sc:tsign1
temptrend_abs.sc:tempave_metab.sc
temptrend_abs.sc:seas.sc
temptrend_abs.sc:microclim.sc 0.397
temptrend_abs.sc:mass.sc -0.201 -0.358
temptrend_abs.sc:speed.sc 0.319 0.166 -0.674
temptrend_abs.sc:nspp.sc -0.150 -0.005 0.180
tsign-1:thermal_bias.sc -0.117 -0.061 0.052
tsign1:thermal_bias.sc -0.320 -0.052 -0.104
temptrend_abs.sc:npp.sc 0.459 0.196 -0.075
temptrend_abs.sc:veg.sc 0.032 -0.138 -0.023
temptrend_abs.sc:duration.sc -0.210 -0.189 -0.003
temptrend_abs.sc:human_bowler.sc -0.501 -0.182 0.480
temptrend_abs.sc:tsign-1:thermal_bias.sc 0.374 0.182 -0.228
temptrend_abs.sc:tsign1:thermal_bias.sc 0.520 0.087 0.003
tmptrnd_bs.sc:sp. tmptrnd_bs.sc:ns. t-1:_. ts1:_.
temptrend_abs.sc
tsign1
tempave_metab.sc
seas.sc
microclim.sc
mass.sc
speed.sc
nspp.sc
npp.sc
veg.sc
duration.sc
human_bowler.sc
temptrend_abs.sc:tsign1
temptrend_abs.sc:tempave_metab.sc
temptrend_abs.sc:seas.sc
temptrend_abs.sc:microclim.sc
temptrend_abs.sc:mass.sc
temptrend_abs.sc:speed.sc
temptrend_abs.sc:nspp.sc 0.016
tsign-1:thermal_bias.sc -0.035 -0.028
tsign1:thermal_bias.sc 0.034 0.041 0.196
temptrend_abs.sc:npp.sc 0.013 0.050 -0.173 -0.199
temptrend_abs.sc:veg.sc 0.016 -0.022 0.144 -0.042
temptrend_abs.sc:duration.sc -0.108 -0.279 0.071 0.059
temptrend_abs.sc:human_bowler.sc -0.329 0.004 -0.006 -0.029
temptrend_abs.sc:tsign-1:thermal_bias.sc 0.072 -0.085 -0.534 -0.177
temptrend_abs.sc:tsign1:thermal_bias.sc -0.045 -0.045 -0.159 -0.711
tmptrnd_bs.sc:np. tmptrnd_bs.sc:v. tmptrnd_bs.sc:d.
temptrend_abs.sc
tsign1
tempave_metab.sc
seas.sc
microclim.sc
mass.sc
speed.sc
nspp.sc
npp.sc
veg.sc
duration.sc
human_bowler.sc
temptrend_abs.sc:tsign1
temptrend_abs.sc:tempave_metab.sc
temptrend_abs.sc:seas.sc
temptrend_abs.sc:microclim.sc
temptrend_abs.sc:mass.sc
temptrend_abs.sc:speed.sc
temptrend_abs.sc:nspp.sc
tsign-1:thermal_bias.sc
tsign1:thermal_bias.sc
temptrend_abs.sc:npp.sc
temptrend_abs.sc:veg.sc -0.513
temptrend_abs.sc:duration.sc -0.047 0.116
temptrend_abs.sc:human_bowler.sc -0.145 -0.075 0.053
temptrend_abs.sc:tsign-1:thermal_bias.sc 0.494 -0.339 -0.057
temptrend_abs.sc:tsign1:thermal_bias.sc 0.411 0.068 -0.056
tmptrnd_bs.sc:h_. t_.:-1
temptrend_abs.sc
tsign1
tempave_metab.sc
seas.sc
microclim.sc
mass.sc
speed.sc
nspp.sc
npp.sc
veg.sc
duration.sc
human_bowler.sc
temptrend_abs.sc:tsign1
temptrend_abs.sc:tempave_metab.sc
temptrend_abs.sc:seas.sc
temptrend_abs.sc:microclim.sc
temptrend_abs.sc:mass.sc
temptrend_abs.sc:speed.sc
temptrend_abs.sc:nspp.sc
tsign-1:thermal_bias.sc
tsign1:thermal_bias.sc
temptrend_abs.sc:npp.sc
temptrend_abs.sc:veg.sc
temptrend_abs.sc:duration.sc
temptrend_abs.sc:human_bowler.sc
temptrend_abs.sc:tsign-1:thermal_bias.sc -0.153
temptrend_abs.sc:tsign1:thermal_bias.sc -0.145 0.337
Standardized Within-Group Residuals:
Min Q1 Med Q3 Max
-4.25987257 -0.29069598 -0.02883191 0.25023757 5.23849247
Number of Observations: 608
Number of Groups:
STUDY_ID rarefyID %in% STUDY_ID
18 608
summary(modTfullHornMar)
Linear mixed-effects model fit by REML
Data: trends[i3, ]
Random effects:
Formula: ~temptrend_abs.sc | STUDY_ID
Structure: General positive-definite, Log-Cholesky parametrization
StdDev Corr
(Intercept) 0.02167793 (Intr)
temptrend_abs.sc 0.02656924 0.035
Formula: ~1 | rarefyID %in% STUDY_ID
(Intercept) Residual
StdDev: 0.02055808 2.782391
Variance function:
Structure: Power of variance covariate
Formula: ~nyrBT
Parameter estimates:
power
-2.432839
Fixed effects: Horntrendrem0 ~ temptrend_abs.sc * tsign + temptrend_abs.sc * tempave_metab.sc + temptrend_abs.sc * seas.sc + temptrend_abs.sc * microclim.sc + temptrend_abs.sc * mass.sc + temptrend_abs.sc * speed.sc + temptrend_abs.sc * consumerfrac.sc + temptrend_abs.sc * nspp.sc + temptrend_abs.sc * thermal_bias.sc:tsign + temptrend_abs.sc * npp.sc + temptrend_abs.sc * duration.sc + temptrend_abs.sc * human_bowler.sc
Correlation:
(Intr) tmpt_. tsign1 tmpv_. ses.sc mcrcl. mss.sc spd.sc cnsmr.
temptrend_abs.sc -0.263
tsign1 -0.188 0.115
tempave_metab.sc 0.102 -0.003 0.022
seas.sc 0.185 -0.084 -0.091 0.221
microclim.sc 0.037 -0.045 0.008 -0.204 0.067
mass.sc 0.058 -0.033 0.000 0.062 0.037 0.012
speed.sc 0.153 -0.080 -0.079 0.072 0.073 0.039 -0.434
consumerfrac.sc 0.000 0.012 0.029 -0.068 -0.012 0.012 -0.055 0.000
nspp.sc -0.131 0.096 0.058 -0.114 0.092 -0.084 -0.105 0.204 0.112
npp.sc -0.043 0.057 -0.002 -0.053 -0.345 -0.238 -0.024 0.081 -0.040
duration.sc 0.041 -0.022 -0.137 0.053 -0.064 -0.016 -0.001 -0.016 -0.016
human_bowler.sc -0.030 0.030 0.005 0.098 -0.193 0.005 -0.026 0.040 -0.055
temptrend_abs.sc:tsign1 0.089 -0.249 -0.520 -0.048 -0.009 -0.003 0.008 0.032 -0.017
temptrend_abs.sc:tempave_metab.sc -0.031 0.078 -0.081 -0.437 -0.161 0.032 -0.019 0.058 0.040
temptrend_abs.sc:seas.sc -0.078 0.140 0.048 -0.144 -0.689 -0.051 -0.018 -0.038 -0.016
temptrend_abs.sc:microclim.sc -0.022 0.066 -0.016 0.131 -0.010 -0.723 0.014 -0.028 -0.003
temptrend_abs.sc:mass.sc 0.002 0.093 0.012 -0.038 -0.016 0.026 -0.573 0.252 0.060
temptrend_abs.sc:speed.sc -0.031 0.176 0.047 0.026 -0.018 -0.039 0.237 -0.575 0.016
temptrend_abs.sc:consumerfrac.sc -0.013 -0.027 -0.018 0.051 0.006 0.017 0.052 0.007 -0.719
temptrend_abs.sc:nspp.sc 0.038 -0.174 -0.024 0.031 -0.065 0.046 0.026 -0.170 -0.064
tsign-1:thermal_bias.sc 0.037 0.000 -0.166 0.241 -0.140 -0.031 -0.046 0.047 -0.004
tsign1:thermal_bias.sc 0.006 -0.004 0.129 0.432 -0.171 -0.128 -0.002 0.027 -0.005
temptrend_abs.sc:npp.sc 0.007 -0.082 0.014 0.031 0.208 0.182 -0.009 -0.036 0.014
temptrend_abs.sc:duration.sc -0.104 0.249 0.028 0.111 0.011 -0.038 0.036 0.016 0.030
temptrend_abs.sc:human_bowler.sc 0.029 -0.029 -0.017 -0.067 0.145 -0.007 0.023 -0.033 0.133
temptrend_abs.sc:tsign-1:thermal_bias.sc -0.012 0.010 0.028 -0.091 0.105 0.023 0.013 0.009 -0.003
temptrend_abs.sc:tsign1:thermal_bias.sc 0.006 -0.004 -0.104 -0.174 0.072 0.038 0.012 0.042 -0.019
nspp.s npp.sc drtn.s hmn_b. tm_.:1 tmptrnd_bs.sc:t_.
temptrend_abs.sc
tsign1
tempave_metab.sc
seas.sc
microclim.sc
mass.sc
speed.sc
consumerfrac.sc
nspp.sc
npp.sc -0.237
duration.sc -0.279 0.065
human_bowler.sc -0.051 -0.158 0.018
temptrend_abs.sc:tsign1 -0.036 -0.002 0.018 -0.006
temptrend_abs.sc:tempave_metab.sc 0.038 0.018 0.022 -0.044 0.092
temptrend_abs.sc:seas.sc -0.057 0.261 0.016 0.155 0.013 0.196
temptrend_abs.sc:microclim.sc 0.052 0.180 0.004 -0.028 -0.019 0.029
temptrend_abs.sc:mass.sc 0.028 -0.019 0.033 0.031 -0.013 0.041
temptrend_abs.sc:speed.sc -0.167 -0.017 0.027 -0.043 -0.019 -0.156
temptrend_abs.sc:consumerfrac.sc -0.087 0.016 -0.004 0.075 0.046 -0.049
temptrend_abs.sc:nspp.sc -0.643 0.144 0.179 0.044 0.032 -0.064
tsign-1:thermal_bias.sc -0.055 -0.011 0.077 0.141 0.042 -0.054
tsign1:thermal_bias.sc -0.059 -0.118 0.093 0.170 -0.076 -0.125
temptrend_abs.sc:npp.sc 0.133 -0.656 -0.036 0.097 -0.050 -0.027
temptrend_abs.sc:duration.sc 0.253 -0.038 -0.484 0.034 -0.079 -0.042
temptrend_abs.sc:human_bowler.sc 0.039 0.105 -0.005 -0.735 0.018 0.089
temptrend_abs.sc:tsign-1:thermal_bias.sc 0.008 -0.003 -0.030 -0.083 0.059 0.277
temptrend_abs.sc:tsign1:thermal_bias.sc 0.015 0.082 -0.046 -0.122 0.164 0.469
tmptrnd_bs.sc:ss. tmptrnd_bs.sc:mc. tmptrnd_bs.sc:ms.
temptrend_abs.sc
tsign1
tempave_metab.sc
seas.sc
microclim.sc
mass.sc
speed.sc
consumerfrac.sc
nspp.sc
npp.sc
duration.sc
human_bowler.sc
temptrend_abs.sc:tsign1
temptrend_abs.sc:tempave_metab.sc
temptrend_abs.sc:seas.sc
temptrend_abs.sc:microclim.sc 0.053
temptrend_abs.sc:mass.sc 0.005 -0.063
temptrend_abs.sc:speed.sc 0.067 0.051 -0.412
temptrend_abs.sc:consumerfrac.sc -0.029 -0.039 -0.112
temptrend_abs.sc:nspp.sc 0.061 -0.014 -0.009
tsign-1:thermal_bias.sc 0.091 0.011 0.023
tsign1:thermal_bias.sc 0.065 0.049 0.017
temptrend_abs.sc:npp.sc -0.379 -0.338 0.065
temptrend_abs.sc:duration.sc -0.046 0.044 -0.068
temptrend_abs.sc:human_bowler.sc -0.171 -0.022 -0.025
temptrend_abs.sc:tsign-1:thermal_bias.sc -0.127 -0.034 -0.014
temptrend_abs.sc:tsign1:thermal_bias.sc -0.069 -0.123 -0.016
tmptrnd_bs.sc:sp. tmptrnd_bs.sc:c. tmptrnd_bs.sc:ns. t-1:_.
temptrend_abs.sc
tsign1
tempave_metab.sc
seas.sc
microclim.sc
mass.sc
speed.sc
consumerfrac.sc
nspp.sc
npp.sc
duration.sc
human_bowler.sc
temptrend_abs.sc:tsign1
temptrend_abs.sc:tempave_metab.sc
temptrend_abs.sc:seas.sc
temptrend_abs.sc:microclim.sc
temptrend_abs.sc:mass.sc
temptrend_abs.sc:speed.sc
temptrend_abs.sc:consumerfrac.sc -0.042
temptrend_abs.sc:nspp.sc 0.212 0.115
tsign-1:thermal_bias.sc -0.015 -0.001 0.009
tsign1:thermal_bias.sc -0.004 0.002 0.000 0.358
temptrend_abs.sc:npp.sc -0.012 -0.003 -0.152 -0.005
temptrend_abs.sc:duration.sc -0.044 0.024 -0.356 -0.028
temptrend_abs.sc:human_bowler.sc 0.038 -0.153 -0.057 -0.092
temptrend_abs.sc:tsign-1:thermal_bias.sc -0.047 0.029 -0.009 -0.482
temptrend_abs.sc:tsign1:thermal_bias.sc -0.124 0.050 -0.033 -0.177
ts1:_. tmptrnd_bs.sc:np. tmptrnd_bs.sc:d. tmptrnd_bs.sc:h_.
temptrend_abs.sc
tsign1
tempave_metab.sc
seas.sc
microclim.sc
mass.sc
speed.sc
consumerfrac.sc
nspp.sc
npp.sc
duration.sc
human_bowler.sc
temptrend_abs.sc:tsign1
temptrend_abs.sc:tempave_metab.sc
temptrend_abs.sc:seas.sc
temptrend_abs.sc:microclim.sc
temptrend_abs.sc:mass.sc
temptrend_abs.sc:speed.sc
temptrend_abs.sc:consumerfrac.sc
temptrend_abs.sc:nspp.sc
tsign-1:thermal_bias.sc
tsign1:thermal_bias.sc
temptrend_abs.sc:npp.sc 0.086
temptrend_abs.sc:duration.sc -0.055 0.054
temptrend_abs.sc:human_bowler.sc -0.124 -0.140 -0.020
temptrend_abs.sc:tsign-1:thermal_bias.sc -0.174 0.011 0.066 0.087
temptrend_abs.sc:tsign1:thermal_bias.sc -0.571 -0.084 0.037 0.137
t_.:-1
temptrend_abs.sc
tsign1
tempave_metab.sc
seas.sc
microclim.sc
mass.sc
speed.sc
consumerfrac.sc
nspp.sc
npp.sc
duration.sc
human_bowler.sc
temptrend_abs.sc:tsign1
temptrend_abs.sc:tempave_metab.sc
temptrend_abs.sc:seas.sc
temptrend_abs.sc:microclim.sc
temptrend_abs.sc:mass.sc
temptrend_abs.sc:speed.sc
temptrend_abs.sc:consumerfrac.sc
temptrend_abs.sc:nspp.sc
tsign-1:thermal_bias.sc
tsign1:thermal_bias.sc
temptrend_abs.sc:npp.sc
temptrend_abs.sc:duration.sc
temptrend_abs.sc:human_bowler.sc
temptrend_abs.sc:tsign-1:thermal_bias.sc
temptrend_abs.sc:tsign1:thermal_bias.sc 0.341
Standardized Within-Group Residuals:
Min Q1 Med Q3 Max
-5.59847381 -0.21790065 -0.02487884 0.21515504 5.76491820
Number of Observations: 32420
Number of Groups:
STUDY_ID rarefyID %in% STUDY_ID
92 32420
Also uses the full models across all realms
coefs1 <- summary(modTfullHornrem0)$tTable
coefs2 <- summary(modTfullHornTerr)$tTable
coefs3 <- summary(modTfullHornFresh)$tTable
coefs4 <- summary(modTfullHornMar)$tTable
varstoplot <- unique(c(rownames(coefs1), rownames(coefs2), rownames(coefs3), rownames(coefs4)))
varstoplot <- varstoplot[which(!grepl('Intercept', varstoplot) | grepl(':', varstoplot))] # vars to plot
rows1_1 <- which(rownames(coefs1) %in% varstoplot) # rows in coefs
rows1_2 <- which(rownames(coefs2) %in% varstoplot)
rows1_3 <- which(rownames(coefs3) %in% varstoplot)
rows1_4 <- which(rownames(coefs4) %in% varstoplot)
xlims <- range(c(coefs1[rows1_1,1] - coefs1[rows1_1,2], coefs1[rows1_1,1] + coefs1[rows1_1,2],
coefs2[rows1_2,1] - coefs2[rows1_2,2], coefs2[rows1_2,1] + coefs2[rows1_2,2],
coefs3[rows1_3,1] - coefs3[rows1_3,2], coefs3[rows1_3,1] + coefs3[rows1_3,2],
coefs4[rows1_4,1] - coefs4[rows1_4,2], coefs4[rows1_4,1] + coefs4[rows1_4,2]))
cols <- brewer.pal(4, 'Dark2') # for full, terr, fresh, mar
pchs <- c(1, 16, 16, 16)
offs <- c(0.1, 0, -0.1, -0.2) # offset vertically for each model
par(las = 1, mai = c(0.5, 4, 0.1, 0.1))
plot(0,0, col = 'white', xlim = xlims, ylim = c(1,length(varstoplot)), yaxt='n', xlab = '', ylab ='')
axis(2, at = length(varstoplot):1, labels = varstoplot, cex.axis = 0.7)
abline(v = 0, col = 'grey', lty = 2)
abline(h = 1:length(varstoplot), col = 'grey', lty = 3)
for(i in 1:length(varstoplot)){
if(varstoplot[i] %in% rownames(coefs1)){
x = coefs1[rownames(coefs1) == varstoplot[i], 1]
se = coefs1[rownames(coefs1) == varstoplot[i], 2]
points(x, length(varstoplot) + 1 - i + offs[1], pch = pchs[1], col = cols[1])
lines(x = c(x-se, x+se), y = c(length(varstoplot) + 1 - i + offs[1], length(varstoplot) + 1 - i + offs[1]), col = cols[1])
}
if(varstoplot[i] %in% rownames(coefs2)){
x = coefs2[rownames(coefs2) == varstoplot[i], 1]
se = coefs2[rownames(coefs2) == varstoplot[i], 2]
points(x, length(varstoplot) + 1 - i + offs[2], pch = pchs[2], col = cols[2])
lines(x = c(x-se, x+se), y = c(length(varstoplot) + 1 - i + offs[2], length(varstoplot) + 1 - i + offs[2]), col = cols[2])
}
if(varstoplot[i] %in% rownames(coefs3)){
x = coefs3[rownames(coefs3) == varstoplot[i], 1]
se = coefs3[rownames(coefs3) == varstoplot[i], 2]
points(x, length(varstoplot) + 1 - i + offs[3], pch = pchs[3], col = cols[3])
lines(x = c(x-se, x+se), y = c(length(varstoplot) + 1 - i + offs[3], length(varstoplot) + 1 - i + offs[3]), col = cols[3])
}
if(varstoplot[i] %in% rownames(coefs4)){
x = coefs4[rownames(coefs4) == varstoplot[i], 1]
se = coefs4[rownames(coefs4) == varstoplot[i], 2]
points(x, length(varstoplot) + 1 - i + offs[4], pch = pchs[4], col = cols[4])
lines(x = c(x-se, x+se), y = c(length(varstoplot) + 1 - i + offs[4], length(varstoplot) + 1 - i + offs[4]), col = cols[4])
}
}
legend('bottomleft', col = cols, pch = pchs, lwd = 1, legend = c('All', 'Terestrial', 'Freshwater', 'Marine'))
[End text in hopes this helps the last figure show up when knitted]